forked from Fusion-Power-Plant-Framework/bluemira
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.flake8
214 lines (209 loc) · 4.7 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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
[flake8]
ignore =
# 1 blank line required before class docstring (ignored in favour of D211)
D203,
# One-line docstring should fit on one line with quotes (ignored, one-line
# docstrings are ugly)
D200,
# Blank lines in docstrings are annoying
D205,
# Backslashes in docstrings used for documentation
D301,
# First line should end with a period (ignored because...)
D400,
# Imperative moods are a pain in the ass
D401,
# whitespace before ':' (ignored because black does this)
E203,
# Line length handled better in black
E501,
# Black says to ignore this one
W503,
# The input method in Python 2 will read from standard input.. we don't use 2
S322,
# Standard pseudo-random generators are not suitable for security/cryptographic purposes. We don't do this
S311,
per-file-ignores =
tests/*:
# Use of assert detected. The enclosed code will be removed when compiling
# to optimised byte code. (ignored because of pytest)
S101,
# Sometimes the tests just run code without using local variables
F841,
# We don't require documentation in tests
D100,
D101,
D102,
D103,
D104,
D105,
D202,
D205,
D210,
D300,
D301,
D401,
D403,
D404,
D406,
D409,
# It can be useful to have class names in test names e.g., test_raises_SomeException
N802,
eudemo/eudemo_tests/*:
# Use of assert detected. The enclosed code will be removed when compiling
# to optimised byte code. (ignored because of pytest)
S101,
# Sometimes the tests just run code without using local variables
F841,
# We don't require documentation in tests
D100,
D101,
D102,
D103,
D104,
D105,
D202,
D205,
D210,
D300,
D301,
D401,
D403,
D404,
D406,
D409,
# It can be useful to have class names in test names e.g., test_raises_SomeException
N802,
__init__.py:
# Allow unused imports in __init__.py, so we can expose at parent module level
F401,
F403,
bluemira/codes/__init__.py:
# FreeCAD message removal function above imports
E402,
bluemira/codes/plasmod/api/_inputs.py:
# We don't control the names of plasmod inputs
N815,
bluemira/codes/plasmod/api/_outputs.py:
# We don't control the names of plasmod outputs
N815,
bluemira/geometry/parameterisations.py:
# Lambdas are probably cleaner here
E731,
documentation/source/*:
D100,
D101,
examples/geometry/optimisation_tutorial.ex.py:
# Contains a URL that's too long for a single line
W505,
examples/optimisation/nonlinearly_constrained_problem.ex.py:
# Has module level imports not at the top of the file
E402,
# Contains a URL that's too long for a single line
W505,
examples/optimisation/geometry_optimisation.ex.py:
# Has module level imports not at the top of the file
E402
exclude =
# No need to traverse our git directory
.git,
# There's no value in checking cache directories
__pycache__,
# The conf file is mostly autogenerated, ignore it
documentation,
# Ignore the virtual environment
.env,
# Ignore other random stuff that people may have lying around
.idea,
.pytest_cache,
htmlcov,
# Ignore data
generated_data,
# versioneer is 3rd-party and we aren't liable for their code
versioneer.py,
bluemira/_version.py,
max-complexity = 20
max-doc-length = 89
max-line-length = 89
statistics = True
docstring-convention = numpy
pep8-naming = True
# Agreed exceptions to naming conventions - see CONTRIBUTING.md
ignore_names =
*PROCESS*,
*PLASMOD*,
*NAME*,
*BINARY*,
*CAD*,
*STP*,
*STL*,
*0D*,
*1D*,
*2D*,
*3D*,
*4D*,
*5D*,
BB,
*VV*,
*TS*,
RS,
*FW*,
CR,
EQ,
DIV,
*RM*,
*HCD*,
NB,
EC,
*IVC*,
*TF*,
*PF*,
*CS*,
*GS*,
*TFV*,
*TBR*,
*LCFS*,
*OIS*,
*JT60SA*,
*ITER*,
princetonD,
flatD,
negativeD,
negativeflatD,
R_0,
Z_0,
B_0,
I_p,
Ip,
A,
F,
Z_eff,
T_e*,
B*,
*B_*,
*Bt*,
*Bx*,
*Bz*,
*Bp*,
*Fz*,
*m_T*,
*DD*,
*DT*,
*SN*,
*DN*,
*CREATE*,
Psol_near,
Psol_far,
*Class,
*L_to_xz*,
*xz_to_L*,
*to_L*,
*L_to_zdz*,
get_Lmap,
set_Lmap,
*LFS*,
*HFS*,
*_OX_*,
*_F,
*eV,
I_not_dI,