-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
55 lines (55 loc) · 1.73 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
54
55
exclude: README.md|migrations
repos:
- repo: https://github.com/ambv/black
rev: '22.1.0'
hooks:
- id: black
args: ['--quiet']
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.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
- id: double-quote-string-fixer
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
additional_dependencies: [
'flake8-bugbear==22.1.11', # Looks for likely bugs and design problems
'flake8-comprehensions==3.8.0', # Looks for unnecessary generator functions that can be converted to list comprehensions
'flake8-deprecated==1.3', # Looks for method deprecations
'flake8-use-fstring==1.3', # Enforces use of f-strings over .format and %s
'flake8-print==4.0.0', # Checks for print statements
'flake8-docstrings==1.6.0', # Verifies that all functions/methods have docstrings
'flake8-annotations==2.7.0', # Enforces type annotation
]
args: ['--enable-extensions=G']
- repo: https://github.com/asottile/pyupgrade
rev: v2.31.1
hooks:
- id: pyupgrade
args: ["--py36-plus"]
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v0.941"
hooks:
- id: mypy
exclude: "test_*"
additional_dependencies:
[
fastapi,
pydantic,
starlette,
sqlmodel,
types-aiofiles,
aioboto3
]