Skip to content

Commit

Permalink
ci: setup pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrugman committed Jan 27, 2023
1 parent 7465623 commit 66a2e68
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
repos:
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies:
- flake8-executable==2.1.3
- bandit==1.7.4
- flake8-bugbear==21.11.29
- flake8-comprehensions==3.10.1
args: [ "--max-line-length", "120" ]
exclude: "tests/to-be-tested/"
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v0.991'
hooks:
- id: mypy
files: ^flake8_executable
exclude: "tests/"
- repo: https://github.com/asottile/yesqa
rev: v1.4.0
hooks:
- id: yesqa
exclude: "tests/to-be-tested/"
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@ Run:

pip install flake8-executable

Or through `pre-commit` with the `.pre-commit-config.yaml`:

```yaml
repos:
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0 # replace with the latest flake8 release
hooks:
- id: flake8
additional_dependencies:
- flake8-executable
```
## Usage
Normally, after flake8-executable is installed, invoking flake8 will also run this plugin. For more
Expand Down

0 comments on commit 66a2e68

Please sign in to comment.