Cleanup requirements & tox config, update pylint
[nfvbench.git] / pylint.rc
1 [MASTER]
2
3 # A comma-separated list of package or module names from where C extensions may
4 # be loaded. Extensions are loading into the active Python interpreter and may
5 # run arbitrary code
6 extension-pkg-whitelist=
7
8 # Add files or directories to the blacklist. They should be base names, not
9 # paths.
10 ignore=CVS
11
12 # Add files or directories matching the regex patterns to the blacklist. The
13 # regex matches against base names, not paths.
14 ignore-patterns=
15
16 # Python code to execute, usually for sys.path manipulation such as
17 # pygtk.require().
18 #init-hook=
19
20 # Use multiple processes to speed up Pylint.
21 jobs=1
22
23 # List of plugins (as comma separated values of python modules names) to load,
24 # usually to register additional checkers.
25 load-plugins=
26
27 # Pickle collected data for later comparisons.
28 persistent=yes
29
30 # Specify a configuration file.
31 #rcfile=
32
33 # Allow loading of arbitrary C extensions. Extensions are imported into the
34 # active Python interpreter and may run arbitrary code.
35 unsafe-load-any-extension=no
36
37
38 [MESSAGES CONTROL]
39
40 # Only show warnings with the listed confidence levels. Leave empty to show
41 # all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
42 confidence=
43
44 # Disable the message, report, category or checker with the given id(s). You
45 # can either give multiple identifiers separated by comma (,) or put this
46 # option multiple times (only on the command line, not in the configuration
47 # file where it should appear only once).You can also use "--disable=all" to
48 # disable everything first and then reenable specific checks. For example, if
49 # you want to run only the similarities checker, you can use "--disable=all
50 # --enable=similarities". If you want to run only the classes checker, but have
51 # no Warning level messages displayed, use"--disable=all --enable=classes
52 # --disable=W"
53 disable=unused-argument,global-statement,too-many-statements,too-many-arguments,too-many-branches,catching-non-exception,too-many-locals,invalid-name,broad-except,raw-checker-failed,locally-disabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,missing-docstring,redefined-builtin,no-name-in-module,no-member,arguments-differ,attribute-defined-outside-init,non-iterator-returned,eval-used,unexpected-keyword-arg,pointless-string-statement,no-value-for-parameter,useless-object-inheritance,import-outside-toplevel,wrong-import-order,consider-using-f-string,consider-using-generator,unnecessary-lambda-assignment,implicit-str-concat,global-variable-not-assigned
54
55 # Enable the message, report, category or checker with the given id(s). You can
56 # either give multiple identifier separated by comma (,) or put this option
57 # multiple time (only on the command line, not in the configuration file where
58 # it should appear only once). See also the "--disable" option for examples.
59 enable=
60
61
62 [REPORTS]
63
64 # Python expression which should return a note less than 10 (10 is the highest
65 # note). You have access to the variables errors warning, statement which
66 # respectively contain the number of errors / warnings messages and the total
67 # number of statements analyzed. This is used by the global evaluation report
68 # (RP0004).
69 evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
70
71 # Template used to display messages. This is a python new-style format string
72 # used to format the message information. See doc for all details
73 #msg-template=
74
75 # Set the output format. Available formats are text, parseable, colorized, json
76 # and msvs (visual studio).You can also give a reporter class, eg
77 # mypackage.mymodule.MyReporterClass.
78 output-format=text
79
80 # Tells whether to display a full report or only the messages
81 reports=no
82
83 # Activate the evaluation score.
84 score=yes
85
86
87 [REFACTORING]
88
89 # Maximum number of nested blocks for function / method body
90 max-nested-blocks=5
91
92
93 [BASIC]
94
95 # Regular expression matching correct argument names
96 argument-rgx=(([a-z][a-z0-9_]{2,50})|(_[a-z0-9_]*))$
97
98 # Regular expression matching correct attribute names
99 attr-rgx=(([a-z][a-z0-9_]{2,50})|(_[a-z0-9_]*))$
100
101 # Bad variable names which should always be refused, separated by a comma
102 bad-names=foo,bar,baz,toto,tutu,tata
103
104 # Regular expression matching correct class attribute names
105 class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,50}|(__.*__))$
106
107 # Regular expression matching correct class names
108 class-rgx=[A-Z_][a-zA-Z0-9]+$
109
110 # Regular expression matching correct constant names
111 const-rgx=(([A-Za-z_][A-Za-z0-9_]*)|(__.*__))$
112
113 # Minimum line length for functions/classes that require docstrings, shorter
114 # ones are exempt.
115 docstring-min-length=-1
116
117 # Regular expression matching correct function names
118 function-rgx=(([a-z][a-zA-Z0-9_]{2,50})|(_[a-z0-9_]*))$
119
120 # Good variable names which should always be accepted, separated by a comma
121 good-names=i,j,k,ex,Run,_
122
123 # Include a hint for the correct naming format with invalid-name
124 include-naming-hint=no
125
126 # Regular expression matching correct inline iteration names
127 inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
128
129 # Regular expression matching correct method names
130 method-rgx=(([a-z][a-z0-9_]{2,50})|(_[a-z0-9_]*))$
131
132 # Regular expression matching correct module names
133 module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
134
135 # Colon-delimited sets of names that determine each other's naming style when
136 # the name regexes allow several styles.
137 name-group=
138
139 # Regular expression which should only match function or class names that do
140 # not require a docstring.
141 no-docstring-rgx=^_
142
143 # List of decorators that produce properties, such as abc.abstractproperty. Add
144 # to this list to register other decorators that produce valid properties.
145 property-classes=abc.abstractproperty
146
147 # Regular expression matching correct variable names
148 variable-rgx=(([a-z][a-z0-9_]{2,50})|(_[a-z0-9_]*))$
149
150
151 [FORMAT]
152
153 # Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
154 expected-line-ending-format=
155
156 # Regexp for a line that is allowed to be longer than the limit.
157 ignore-long-lines=^\s*(# )?<?https?://\S+>?$
158
159 # Number of spaces of indent required inside a hanging  or continued line.
160 indent-after-paren=4
161
162 # String used as indentation unit. This is usually "    " (4 spaces) or "\t" (1
163 # tab).
164 indent-string='    '
165
166 # Maximum number of characters on a single line.
167 max-line-length=100
168
169 # Maximum number of lines in a module
170 max-module-lines=1600
171
172 # Allow the body of a class to be on the same line as the declaration if body
173 # contains single statement.
174 single-line-class-stmt=no
175
176 # Allow the body of an if to be on the same line as the test if there is no
177 # else.
178 single-line-if-stmt=no
179
180
181 [LOGGING]
182
183 # Logging modules to check that the string format arguments are in logging
184 # function parameter format
185 logging-modules=logging
186
187
188 [MISCELLANEOUS]
189
190 # List of note tags to take in consideration, separated by a comma.
191 notes=FIXME,XXX,TODO
192
193
194 [SIMILARITIES]
195
196 # Ignore comments when computing similarities.
197 ignore-comments=yes
198
199 # Ignore docstrings when computing similarities.
200 ignore-docstrings=yes
201
202 # Ignore imports when computing similarities.
203 ignore-imports=no
204
205 # Minimum lines number of a similarity.
206 min-similarity-lines=4
207
208
209 [SPELLING]
210
211 # Spelling dictionary name. Available dictionaries: none. To make it working
212 # install python-enchant package.
213 spelling-dict=
214
215 # List of comma separated words that should not be checked.
216 spelling-ignore-words=
217
218 # A path to a file that contains private dictionary; one word per line.
219 spelling-private-dict-file=
220
221 # Tells whether to store unknown words to indicated private dictionary in
222 # --spelling-private-dict-file option instead of raising a message.
223 spelling-store-unknown-words=no
224
225
226 [TYPECHECK]
227
228 # List of decorators that produce context managers, such as
229 # contextlib.contextmanager. Add to this list to register other decorators that
230 # produce valid context managers.
231 contextmanager-decorators=contextlib.contextmanager
232
233 # List of members which are set dynamically and missed by pylint inference
234 # system, and so shouldn't trigger E1101 when accessed. Python regular
235 # expressions are accepted.
236 generated-members=
237
238 # Tells whether missing members accessed in mixin class should be ignored. A
239 # mixin class is detected if its name ends with "mixin" (case insensitive).
240 ignore-mixin-members=yes
241
242 # This flag controls whether pylint should warn about no-member and similar
243 # checks whenever an opaque object is returned when inferring. The inference
244 # can return multiple potential results while evaluating a Python object, but
245 # some branches might not be evaluated, which results in partial inference. In
246 # that case, it might be useful to still emit no-member and other checks for
247 # the rest of the inferred objects.
248 ignore-on-opaque-inference=yes
249
250 # List of class names for which member attributes should not be checked (useful
251 # for classes with dynamically set attributes). This supports the use of
252 # qualified names.
253 ignored-classes=optparse.Values,thread._local,_thread._local
254
255 # List of module names for which member attributes should not be checked
256 # (useful for modules/projects where namespaces are manipulated during runtime
257 # and thus existing member attributes cannot be deduced by static analysis. It
258 # supports qualified module names, as well as Unix pattern matching.
259 ignored-modules=
260
261 # Show a hint with possible names when a member name was not found. The aspect
262 # of finding the hint is based on edit distance.
263 missing-member-hint=yes
264
265 # The minimum edit distance a name should have in order to be considered a
266 # similar match for a missing member name.
267 missing-member-hint-distance=1
268
269 # The total number of similar names that should be taken in consideration when
270 # showing a hint for a missing member.
271 missing-member-max-choices=1
272
273
274 [VARIABLES]
275
276 # List of additional names supposed to be defined in builtins. Remember that
277 # you should avoid to define new builtins when possible.
278 additional-builtins=
279
280 # Tells whether unused global variables should be treated as a violation.
281 allow-global-unused-variables=yes
282
283 # List of strings which can identify a callback function by name. A callback
284 # name must start or end with one of those strings.
285 callbacks=cb_,_cb
286
287 # A regular expression matching the name of dummy variables (i.e. expectedly
288 # not used).
289 dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
290
291 # Argument names that match this expression will be ignored. Default to name
292 # with leading underscore
293 ignored-argument-names=_.*|^ignored_|^unused_
294
295 # Tells whether we should check for unused import in __init__ files.
296 init-import=no
297
298 # List of qualified module names which can have objects that can redefine
299 # builtins.
300 redefining-builtins-modules=six.moves,future.builtins
301
302
303 [CLASSES]
304
305 # List of method names used to declare (i.e. assign) instance attributes.
306 defining-attr-methods=__init__,__new__,setUp
307
308 # List of member names, which should be excluded from the protected access
309 # warning.
310 exclude-protected=_asdict,_fields,_replace,_source,_make
311
312 # List of valid names for the first argument in a class method.
313 valid-classmethod-first-arg=cls
314
315 # List of valid names for the first argument in a metaclass class method.
316 valid-metaclass-classmethod-first-arg=mcs
317
318
319 [DESIGN]
320
321 # Maximum number of arguments for function / method
322 max-args=12
323
324 # Maximum number of attributes for a class (see R0902).
325 max-attributes=32
326
327 # Maximum number of boolean expressions in a if statement
328 max-bool-expr=6
329
330 # Maximum number of branch for function / method body
331 max-branches=30
332
333 # Maximum number of locals for function / method body
334 max-locals=15
335
336 # Maximum number of parents for a class (see R0901).
337 max-parents=7
338
339 # Maximum number of public methods for a class (see R0904).
340 max-public-methods=40
341
342 # Maximum number of return / yield for function / method body
343 max-returns=6
344
345 # Maximum number of statements in function / method body
346 max-statements=50
347
348 # Minimum number of public methods for a class (see R0903).
349 min-public-methods=0
350
351 [ELIF]
352 max-nested-blocks=6
353
354 [IMPORTS]
355
356 # Allow wildcard imports from modules that define __all__.
357 allow-wildcard-with-all=no
358
359 # Analyse import fallback blocks. This can be used to support both Python 2 and
360 # 3 compatible code, which means that the block might have code that exists
361 # only in one or another interpreter, leading to false positives when analysed.
362 analyse-fallback-blocks=no
363
364 # Deprecated modules which should not be used, separated by a comma
365 deprecated-modules=regsub,TERMIOS,Bastion,rexec
366
367 # Create a graph of external dependencies in the given file (report RP0402 must
368 # not be disabled)
369 ext-import-graph=
370
371 # Create a graph of every (i.e. internal and external) dependencies in the
372 # given file (report RP0402 must not be disabled)
373 import-graph=
374
375 # Create a graph of internal dependencies in the given file (report RP0402 must
376 # not be disabled)
377 int-import-graph=
378
379 # Force import order to recognize a module as part of the standard
380 # compatibility libraries.
381 known-standard-library=
382
383 # Force import order to recognize a module as part of a third party library.
384 known-third-party=enchant
385
386
387 [EXCEPTIONS]
388
389 # Exceptions that will emit a warning when being caught. Defaults to
390 # "Exception"
391 overgeneral-exceptions=Exception