Skip to content

Commit

Permalink
Add .pre-commit-config.yaml to automatically detect code issues when …
Browse files Browse the repository at this point in the history
…git commit
  • Loading branch information
send18 committed Jul 22, 2023
1 parent d74215c commit 56ae937
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Install
# 1. pip install pre-commit
# 2. pre-commit install(the first time you download the repo, it will be cached for future use)
repos:
- repo: https://github.com/pycqa/flake8
rev: 4.0.1
hooks:
- id: flake8
args: [
"--show-source",
"--count",
"--statistics",
"--extend-ignore=E203,E402,C901,E501,E101,E266,E731,W291,F821,W191",
"--per-file-ignores=__init__.py:F401",
] # when necessary, ignore errors, https://flake8.pycqa.org/en/latest/user/error-codes.html
exclude: ^venv/ # exclude dir, e.g. (^foo/|^bar/)

- repo: https://github.com/pycqa/isort
rev: 5.11.5
hooks:
- id: isort
args: ['--profile', 'black']

0 comments on commit 56ae937

Please sign in to comment.