-
Notifications
You must be signed in to change notification settings - Fork 68
/
.pre-commit-config.yaml
53 lines (53 loc) · 1.66 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
exclude: README.md
repos:
- repo: https://github.com/ambv/black
rev: '23.9.1'
hooks:
- id: black
args: ['--quiet']
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-case-conflict
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-ast
- id: check-json
- id: check-merge-conflict
- id: detect-private-key
- repo: https://github.com/pycqa/flake8
rev: 6.1.0
hooks:
- id: flake8
additional_dependencies: [
'flake8-bugbear==23.9.16', # Looks for likely bugs and design problems
'flake8-comprehensions==3.14.0', # Looks for unnecessary generator functions that can be converted to list comprehensions
'flake8-deprecated==2.1', # Looks for method deprecations
'flake8-use-fstring==1.4', # Enforces use of f-strings over .format and %s
'flake8-print==5.0.0', # Checks for print statements
'flake8-docstrings==1.7.0', # Verifies that all functions/methods have docstrings
'flake8-annotations==3.0.1', # Enforces type annotation
]
args: ['--enable-extensions=G']
- repo: https://github.com/asottile/pyupgrade
rev: v3.14.0
hooks:
- id: pyupgrade
args: ["--py36-plus"]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.5.1"
hooks:
- id: mypy
exclude: "test_*"
additional_dependencies:
[
fastapi,
pydantic,
pydantic-settings,
starlette,
httpx
]