-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.cfg
59 lines (54 loc) · 1.73 KB
/
setup.cfg
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
56
57
58
59
[flake8]
ignore =
# Ignore string formatting with f-strings
G004,
# Line break occurred before a binary operator (W503)
# https://github.com/psf/black/issues/52
W503,
# Line too long (E501)
# 1. black does not format comments
# https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#comments
# 2. long links in doc strings are an issue
E501
# flake8-builtins
# the likelihood of running into an issue when shadowing a buildin
# with a class attribute is very low
A003,
# flake8-bugbear
# fastapi recommends to use `Depend()` as an argument default.
# Unfortunately, exceptions are hardcoded in bugbear.
# https://github.com/PyCQA/flake8-bugbear/issues/62
B008,
E203,
# Ignore space before : in complex slices
# https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#slices
E800,
# Ignore commented out code
TRY300,
# Consider moving this statement to an 'else' block
TRY003,
# Avoid specifying long messages outside the exception class
TRY400,
# Use logging '.exception' instead of '.error'
TRY101
# Too many try blocks in your function
E402,
# Module level import not at top of file
C901,
# Too complex
F401,
# Unused imports
# pep8-naming
classmethod-decorators =
classmethod, # built-in
validator, # pydantic
root_validator, # pydantic
enable-extensions=
G, # flake8-logging-format
per-file-ignores =
# star imports in `__init__.py` files are ok
*/__init__.py: F401
# Enables maccabe complexity checks
# see https://github.com/PyCQA/mccabe#plugin-for-flake8
max-complexity = 10
exclude = .git,__pycache__,old,build,dist,.venv,.eggs,.tox