-
Notifications
You must be signed in to change notification settings - Fork 20
/
setup.cfg
463 lines (434 loc) · 11.7 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
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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
[bdist_rpm]
requires = ant-apache-regexp
ant-contrib
aquilon-protocols
git >= 1.8.4
knc >= 1.7.1
krb5-workstation
python-coverage
python-dateutil
python-ipaddress
python-lxml
python-mako
python-psycopg2 >= 2.5.1
python-six >= 1.7.3
python-sqlalchemy >= 0.9.7
python-twisted-core >= 12.2.0
python-twisted-runner >= 12.2.0
python-twisted-web >= 12.2.0
python-zope-interface
PyYAML
build_requires =
docbook5-schemas
docbook5-style-xsl
python-cheetah
system-release
release = 1%{dist}
group = quattor
prep-script = tools/cleanup-ms.sh
post-install = tools/regenerate-twisted-caches.sh
build-script = tools/build-autocomplete.sh
[flake8]
select =
# Rules to enable
# ---------------
#
# As aqd is not fully compliant with PEP8, we will define here
# the rules that apply in order to ensure code consistency
# throughout the code base, and similar code styles even if many
# people are touching it with different ideas and preferences.
#
# As stated by PEP8: "Many projects have their own coding style
# guidelines. In the event of any conflicts, such project-specific
# guides take precedence for that project"
#
# (^) These checks can be disabled at the line level using
# the # noqa special comment. This possibility should be
# reserved for special cases.
#
# AQD checks
#
AQD,
#
# pycodestyle
# E1 / Indentation
#
# indentation contains mixed spaces and tabs
E101,
# indentation is not a multiple of four
E111,
# expected an indented block
E112,
# unexpected indentation
E113,
# indentation is not a multiple of four (comment)
E114,
# expected an indented block (comment)
E115,
# unexpected indentation (comment)
E116,
# continuation line under-indented for hanging indent (^)
E121,
# continuation line missing indentation or outdented (^)
E122,
# closing bracket does not match indentation of opening
# bracket's line
# E123,
# closing bracket does not match visual indentation (^)
E124,
# 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,
# closing bracket is missing indentation
E133,
#
# pycodestyle
# E2 / Whitespace
#
# whitespace after '('
E201,
# whitespace before ')'
E202,
# whitespace before ':'
E203,
# whitespace before '('
E211,
# multiple spaces before operator
E221,
# multiple spaces after operator
E222,
# tab before operator
E223,
# tab after operator
E224,
# 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 ',', ';', or ':'
E231,
# multiple spaces after ',' (*)
E241,
# tab after ',' (*)
E242,
# 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 spaces before keyword
E272,
# tab after keyword
E273,
# tab before keyword
E274,
# missing whitespace after keyword
E275,
#
# pycodestyle
# E3 / Blank line
#
# expected 1 blank line, found 0
E301,
# expected 2 blank lines, found 0
E302,
# too many blank lines (3)
E303,
# blank lines found after function decorator
E304,
# expected 2 blank lines after end of function or class
E305,
# expected 1 blank line before a nested definition
E306,
#
# pycodestyle
# E4 / Import
#
# multiple imports on one line
E401,
# module level import not at top of file
# E402,
#
# pycodestyle
# E5 / Line length
#
# line too long (82 > 79 characters) (^)
E501,
# the backslash is redundant between brackets
E502,
#
# pycodestyle
# E7 / Statement
#
# multiple statements on one line (colon)
E701,
# multiple statements on one line (semicolon)
E702,
# statement ends with a semicolon
E703,
# multiple statements on one line (def)
E704,
# comparison to None should be 'if cond is None:' (^)
E711,
# comparison to True should be 'if cond is True:' or 'if cond:' (^)
# E712, # ignored as 'column == True' is normal in sqlalchemy
# test for membership should be 'not in'
E713,
# test for object identity should be 'is not'
E714,
# do not compare types, use 'isinstance()' (^)
E721,
# do not use bare except, specify exception instead
E722,
# do not assign a lambda expression, use a def
E731,
# do not use variables named 'l', 'O', or 'I'
E741,
# do not define classes named 'l', 'O', or 'I'
E742,
# do not define functions named 'l', 'O', or 'I'
E743,
#
# pycodestyle
# E9 / Runtime
#
# SyntaxError or IndentationError
E901,
# IOError
E902,
#
# pycodestyle
# W1 / Indentation warning
#
# indentation contains tabs
W191,
#
# pycodestyle
# W2 / Whitespace warning
#
# trailing whitespace
W291,
# no newline at end of file
W292,
# blank line contains whitespace
W293,
#
# W3 / Blank line warning
#
# blank line at end of file
W391,
#
# pycodestyle
# W5 / Line break warning
#
# line break before binary operator
W503,
# line break after binary operator
# W504,
# doc line too long (82 > 79 characters) (^)
W505,
#
# pycodestyle
# W6 / Deprecation warning
#
# .has_key() is deprecated, use 'in'
W601,
# deprecated form of raising exception
W602,
# '<>' is deprecated, use '!='
W603,
# backticks are deprecated, use 'repr()'
W604,
# invalid escape sequence 'x'
W605,
# 'async' and 'await' are reserved keywords starting
# with Python 3.7
W606,
#
# pyflakes
# F4 / Import issues
#
# Module imported but unused
F401,
# Import module from line n shadowed by loop variable
F402,
# 'from module import *' used; unable to detect undefined names
F403,
# Future import(s) name after other statements
F404,
# Name may be undefined, or defined from star imports: module
F405,
#
# pyflakes
# F8 / Undefined/unused things
#
# Redefinition of unused name from line n
F811,
# List comprehension redefines name from line n
F812,
# Undefined name name
F821,
# Undefined name name in __all__
F822,
# Local variable name ... referenced before assignment
F823,
# Duplicate argument name in function definition
F831,
# Local variable name is assigned to but never used
F841,
#
# mccabe
# C9 / Complexity issues
#
# Function is too complex
# C901,
#
# hacking
# General
#
# Use only UNIX style newlines (\n), not Windows style (\r\n)
H903,
# Do not write except:, use except Exception: at the very least.
# When catching an exception you should be as specific so you
# don't mistakenly catch unexpected exceptions
H201,
# Include your name with TODOs as in # TODO(yourname). This makes
# it easier to find out who the author of the comment was
# H101,
# Don't use author tags. We use version control instead
H105,
# Don't put vim configuration in source files
# H106,
# Delay string interpolations at logging calls
# H904,
#
# hacking
# H3 / Imports
#
# Do not import more than one module per line
# (except for migrate, sqlalchemy, i18n)
# *NOTICE:* replaced by project-specific rules in the local plugins
# H301,
# Do not use wildcard * import
# (except from migrate, sqlalchemy, i18n)
H303,
# Do not make relative imports
# H304,
# Alphabetically order your imports by the full module path
H306,
#
# hacking
# H4 / Docstrings
#
# Docstrings should not start with a space
H401,
# Multi line docstrings should end on a new line
H403,
# Multi line docstrings should start without a leading new line
H404,
# Multi line docstrings should start with a one line summary
# followed by an empty line
H405,
#
# hacking
# H5 / Dictionaries/Lists
#
# Do not use locals() or self.__dict__ for formatting strings,
# it is not clear as using explicit dictionaries and can hide
# errors during refactoring
H501,
#
# hacking
# H7 / Internationalization (i18n) Strings
#
# If you have a variable to place within the string, first
# internationalize the template string then do the replacement
# H702,
# If you have multiple variables to place in the string, use
# keyword parameters.
# H703,
#
# hacking
# Python 3.x compatibility
#
# except. Instead of: "except x,y:" use: "except x as y:"
H231,
# Python 3.x has become more strict regarding octal string literals.
# Use 0o755 instead of 0755. Similarly, explicit use of long literals
# (01234L) should be avoided
H232,
# The print operator can be avoided by using
# "from __future__ import print_function" at the top of the module
H233,
# assertEquals() logs a DeprecationWarning in Python 3.x, use
# assertEqual() instead. The same goes for assertNotEquals()
H234,
# assert_() is deprecated in Python 3.x, use assertTrue() instead
H235,
# Use six.add_metaclass instead of __metaclass__
H236,
# Don't use modules that were removed in Python 3. Removed module list:
# http://python3porting.com/stdlib.html#removed-modules
H237,
# Old style classes are deprecated and no longer available in Python 3
# (they are converted to new style classes). In order to avoid any
# unwanted side effects all classes should be declared using new style.
H238,
#
# hacking
# Unit tests and assertRaises
#
# Testing for Exception being raised is almost always a mistake since
# it will match (almost) every exception, even those unrelated to the
# exception intended to be tested
H202,
# Use assertIs(Not)None to check for None
H203,
# Use assert(Not)Equal to check for equality
H204,
# Use assert(Greater|Less)(Equal) for comparison
H205,
# Require autospec, spec, or spec_set in mock.patch() or
# mock.patch.object() calls
# H210,
#
# hacking
# Licensing
#
# Files with no code shouldn't contain any license header nor comments,
# and must be left completely empty
H104,
exclude =
# No need to traverse our git directory
.git,
# There's no value in checking cache directories
__pycache__,
per-file-ignores =
**/__init__.py: F401,H306
max-line-length = 79
max-doc-length = 72
[flake8:local-plugins]
extension =
AQD40 = imports:one_import_per_line
paths =
./tests/flake8plugins