-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
35 lines (35 loc) · 1.26 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
# See
# https://medium.com/staqu-dev-logs/keeping-python-code-clean-with-pre-commit-hooks-black-flake8-and-isort-cac8b01e0ea1
default_language_version:
python: python3.10
exclude: (?x)(^docs/_build)
repos:
- repo: https://github.com/psf/black
rev: 22.8.0
hooks:
- id: black # Format Python code
additional_dependencies: [--index-url=https://pypi.org/simple/]
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v1.7.0 # Use the sha / tag you want to point at
hooks:
- id: autopep8
additional_dependencies: [--index-url=https://pypi.org/simple/]
- repo: https://github.com/pycqa/flake8
rev: 5.0.4
hooks:
- id: flake8 # Apply flake 8 python file linter
additional_dependencies:
- --index-url=https://pypi.org/simple/
- flake8-annotations==2.9.1
- flake8-bugbear==22.8.23
- flake8-docstrings==1.6.0
- flake8-walrus==1.2.0
- flake8-typing-imports==1.13.0
- repo: https://github.com/asottile/pyupgrade
rev: v2.37.3
hooks:
- id: pyupgrade
args: [--py3-plus]
additional_dependencies: [--index-url=https://pypi.org/simple/]