.pre-commit-config.yaml
repos:
- repo: 'https://gitlab.com/pycqa/flake8'
rev: 3.8.2
hooks:
- id: flake8
name: Style Guide Enforcement (flake8)
args:
- '--max-line-length=90'
- repo: 'https://github.com/asottile/pyupgrade'
rev: v2.4.3
hooks:
- id: pyupgrade
name: Upgrade syntax for newer versions of the language (pyupgrade)
args:
- '--py37-plus'
- repo: 'https://github.com/asottile/reorder_python_imports'
rev: v2.3.0
hooks:
- id: reorder-python-imports
name: 'Reorder Python imports (src, tests)'
files: ^(?!examples/)
args:
- '--application-directories'
- src
- repo: 'https://github.com/pre-commit/pre-commit-hooks'
rev: v3.1.0
hooks:
- id: check-byte-order-marker
- id: trailing-whitespace
- id: end-of-file-fixer
- repo: 'https://github.com/python/black'
rev: 19.10b0
hooks:
- id: black
name: Uncompromising Code Formatter (black)
- repo: https://github.com/necaris/pre-commit-pyright
rev: '1.1.53'
hooks:
- id: pyright
args:
- '-p'
- 'pyrightconfig.json'
- repo: 'https://github.com/asottile/dead'
rev: v1.3.0
hooks:
- id: dead
args:
- '--exclude'
- 'docs/source/conf.py'
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.1.10
hooks:
- id: insert-license
name: Add license for all Python files
exclude: ^docs/source/conf.py$
types: [python]
args:
- --comment-style
- "|#|"
- --license-filepath
- LICENSE.md
- --fuzzy-match-generates-todo
- repo: https://github.com/pycqa/pydocstyle
rev: 6.1.1
hooks:
- id: pydocstyle
name: Run pydocstyle
exclude: |
(?x)
^tests/.*\.py$
args:
- --convention=pep257
- --add-ignore=D100,D104,D205,D400