-
Notifications
You must be signed in to change notification settings - Fork 56
/
setup.cfg
61 lines (57 loc) · 1.81 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
60
61
# This file is used to configure your project.
# Read more about the various options under:
# http://setuptools.readthedocs.io/en/latest/setuptools.html#configuring-setup-using-setup-cfg-files
# Note: These tools do not yet support `pyproject.toml`, but these options
# should be moved there once support is added.
[flake8]
select = B,C,E,F,P,W,B9
max-line-length = 88
max-complexity = 10
# E501, # max-line-length
# # ignored because pytorch uses dict
# C408, # use {} instead of dict()
# # Not Black-compatible
# E203, # whitespace before :
# E231, # missing whitespace after ','
# W291, # trailing whitespace
# W503, # line break before binary operator
# W504, # line break after binary operator
# B905, # 'zip()' without an explicit 'strict=' parameter
# B028, # No explicit stacklevel keyword argument found (warn)
ignore =
E501,
C408,
E203,
E231,
W291,
W503,
W504,
B905,
B028,
exclude = docs, build, .git, docs_src/rtd, docs_src/rtd_output, .eggs
# Differences with pytorch
#
# Smaller max-line-length
# Enabled max-complexity
# No flake8-mypy (T4 range)
#
# Set of rules ignore by pytorch, probably to get around the C
#
# F401 (import unused in __init__.py) not ignored
# F403 'from module import *' used; unable to detect undefined names
# F405 Name may be undefined, or defined from star imports: module
# F821 Undefined name name
# F841 Local variable name is assigned to but never used
#
# Pytorch ignored rules that I don't see a reason to ignore (yet?):
#
# E305 Expected 2 blank lines after end of function or class
# E402 Module level import not at top of file
# E721 Do not compare types, use 'isinstance()'
# E741 Do not use variables named 'l', 'o', or 'i'
# E302 Expected 2 blank lines, found 0
# E303 Too many blank lines (3)
[darglint]
docstring_style = google
# short, long, full
strictness = full