Skip to content

Commit

Permalink
ci: setup pre-commit (#63)
Browse files Browse the repository at this point in the history
* ci: setup pre-commit

* ci: update renovate
  • Loading branch information
sbrugman authored Jan 29, 2023
1 parent 7465623 commit 0e57dea
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
"fileMatch": ["requirements.*\.txt$"]
},

"pre-commit": {
"enabled": true
},

"labels": [
"renovate"
],
Expand Down
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 0e57dea

Please sign in to comment.