-
Notifications
You must be signed in to change notification settings - Fork 1
/
.flake8
121 lines (113 loc) · 3.21 KB
/
.flake8
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
[flake8]
extend-ignore =
# Allow function call as argument default
B008,
# Do not enforce trailing comma (lets Black decide what is best)
C812,C813,C814,C815,C816,C818,C819,
# Don't ask for docstring at top of module --- put it in the functions/classes
D100,
# Do not check for docstring within __init__ method
D107,
# Ignore whitespace before ';'
E203,
# Don't ask about line length, Black recommends using bugbear B950 instead
E501,
# Stop finding commented out code because it's mistaking shape annotations for code
E800,
# Just let the formatter complain about isort
I,
# Stop complaining about using functions from random
S311,
# Ignore errors for internal mypy traceback, stderr output, or an unmatched line.
T499,
# Do not complain about line-break before binary operator (caused by Black)
W503,
# Do not warn on too many imports.
WPS201,
# Do not warn on too many module members
WPS202,
# Do not warn when too many arguments in functions
WPS211,
# Do not warn on too many methods
WPS214,
# Allow lots of importing from the same module --- it can happen and thats okay!
WPS235,
# Do not warn on complex f-string
WPS237,
# Allow relative module references
WPS300,
# Allow f-strings
WPS305,
# Do not force base classes to inherit object
WPS306,
# Allow return statement that simply returns a prior statement
WPS331,
# Allow new lines to start with a dot (caused by Black)
WPS348,
# Allow logic in __init__ modules
WPS412,
# Google Python style is not RST until after processed by Napoleon
# See https://github.com/peterjc/flake8-rst-docstrings/issues/17
RST201,RST203,RST301,
extend-select =
# Should raise AssertionError instead of assert False
B011,
# Use of break, continue or return in finally blocks will silence exceptions.
B012,
# Redundant exception types in except
B014,
# Pointless comparisons
B015,
# Cannot raise a literal
B016,
# Do not use `self.assertRaises(Exception)`
B017,
# Find useless expressions
B018,
# Use namedtuple instead of dataclass when only `__init__` attributes are set
B903,
# Within an except clause, raise exceptions with `raise ... from err` or `raise ...
# from None` to distinguish them from errors in exception handling
B904,
# Counterpart to W503, enforce having the operator at the start of a new line.
W504,
max-line-length = 99
max-complexity = 18
max-methods = 10
max-line-complexity = 18
max-local-variables = 20
max-expressions = 20
max-function-expressions = 10
max-module-expressions = 20
max-string-usages = 10
max-annotation-complexity = 4
min-name-length = 1
max-try-body-length = 2
format = wemake
# Black enforces double quotes.
inline-quotes = double
docstring-convention = google
# Darglint
docstring_style = google
strictness = long
nested-classes-whitelist =
Meta
Params
Config
allowed-domain-names =
data
utils
util
params
per-file-ignores =
src/*/_version.py:WPS410
src/**/__init__.py:D,F401,WPS436
tests/*:D,F401,WPS118,WPS202,WPS204,WPS214,WPS218,WPS226,WPS231,WPS232,WPS235,WPS301,WPS432,WPS437,WPS442,S101
scripts/update_torch_cuda.py:S404,S603,S607,WPS323,WPS333,WPS432,WPS433,WPS459
extend-exclude=
.venv/,
*_cache/,
.cache/,
logs/,
storage/,
docs/