Skip to content

Commit

Permalink
feat: add pre-commit config file;
Browse files Browse the repository at this point in the history
  • Loading branch information
WenjieDu committed Aug 8, 2023
1 parent 5dac221 commit b49e667
Showing 1 changed file with 23 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:
# hooks for checking files
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml

# hooks for linting code
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black

- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
args: [
--max-line-length=120, # refer to setup.cfg
--extend-ignore=E203, # why ignore E203? Refer to https://github.com/PyCQA/pycodestyle/issues/373
]

0 comments on commit b49e667

Please sign in to comment.