forked from Slicer/Slicer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.flake8
150 lines (142 loc) · 4.01 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
[flake8]
max-line-length = 550
# Whether to display the pep8 instructions on failure (can be quite verbose)
show-pep8 = False
# Whether to show source code for each failure
show-source = True
# Maximum cyclomatic complexity allowed
max-complexity = 80
format = pylint
exclude = .git,__pycache__
per-file-ignores = \
# Module imported but unused
Base/Python/mrml.py:F401 \
Base/Python/slicer/logic.py:F401 \
Base/Python/vtkAddon.py:F401 \
Base/Python/vtkITK.py:F401 \
Base/Python/vtkSegmentationCore.py:F401 \
Base/Python/vtkTeem.py:F401 \
Modules/*/__init__.py:F401 \
Extensions/*/__init__.py:F401 \
Utilities/*/__init__.py:F401
ignore = \
# Do not use bare `except:`, it also catches unexpected events like memory errors, interrupts, system exit, and so on.
B001, \
# Do not use mutable data structures for argument defaults.
B006, \
# Loop control variable not used within the loop body.
B007, \
# Do not perform function calls in argument defaults.
B008, \
# Do not call getattr(x, 'attr'), instead use normal property access: x.attr.
B009, \
# B010] Do not call setattr with a constant attribute value, it is not any safer than normal property access.
B010, \
# Indentation is not a multiple of four
E111, \
# Indentation is not a multiple of four (comment)
E114, \
# expected an indented block (comment)
E115, \
# unexpected indentation (comment)
E116, \
# over-indented
E117, \
# continuation line under-indented for hanging indent
E121, \
# continuation line missing indentation or outdented
E122, \
# closing bracket does not match visual indentation
E124, \
# closing bracket does not match indentation of opening bracket's line
E123, \
# continuation line with same indent as next logical line
E125, \
# continuation line over-indented for hanging indent
E126, \
# continuation line over-indented for visual indent
E127, \
# continuation line under-indented for visual indent
E128, \
# visually indented line with same indent as next logical line
E129, \
# continuation line unaligned for hanging indent
E131, \
# whitespace after '('
E201, \
# whitespace before ')'
E202, \
# whitespace before ','
E203, \
# whitespace before '('
E211, \
# multiple spaces before operator
E221, \
# multiple spaces after operator
E222, \
# missing whitespace around operator
E225, \
# missing whitespace around arithmetic operator
E226, \
# missing whitespace around bitwise or shift operator
E227, \
# missing whitespace around modulo operator
E228, \
# missing whitespace after ','
E231, \
# multiple spaces after ','
E241, \
# unexpected spaces around keyword / parameter equals
E251, \
# at least two spaces before inline comment
E261, \
# inline comment should start with '# '
E262, \
# block comment should start with '# '
E265, \
# too many leading '#' for block comment
E266, \
# multiple spaces after keyword
E271, \
# multiple imports on one line
E401, \
# module level import not at top of file
E402, \
# the backslash is redundant between bracket
E502, \
# multiple statements on one line (colon)
E701, \
# statement ends with a semicolon
E703, \
# comparison to True should be 'if cond is True:' or 'if cond:'
E712, \
# test for membership should be 'not in'
E713, \
# test for object identity should be 'is not'
E714, \
# do not use bare 'except'
E722, \
# do not assign a lambda expression, use a def
E731, \
# ambiguous variable name 'l'
E741, \
# 'from module import *' used; unable to detect undefined names
F403, \
# Name may be undefined, or defined from star import
F405, \
# f-string is missing placeholders
F541, \
# Redefinition of unused name from line n
F811, \
# Undefined name name
F821, \
# local variable 'inside_segment' is assigned to but never used
F841, \
# trailing whitespace
W291, \
# blank line contains whitespace
W293, \
# line break before binary operator
W503, \
# line break after binary operator
W504