Debian Codegraph @

pylintrc

raw
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 # Flawfinder specifics: This disables "invalid-name", because that checker
54 # has a serious bug: it can't handle global variables and thinks they are
55 # constants (so it raises a hailstorm of incorrect reports).
56 # We *use* global-statement, so don't warn about it.
57 # TODO: perhaps stop disabling some, e.g.,
58 # missing-docstring, too-many-statements,
59 # too-many-branches,too-many-locals,too-many-nested-blocks
60 disable=print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call,invalid-name,missing-docstring,global-statement,too-many-statements,too-many-branches,too-many-locals,too-many-instance-attributes,too-many-nested-blocks
61
62 # Enable the message, report, category or checker with the given id(s). You can
63 # either give multiple identifier separated by comma (,) or put this option
64 # multiple time (only on the command line, not in the configuration file where
65 # it should appear only once). See also the "--disable" option for examples.
66 enable=
67
68
69 [REPORTS]
70
71 # Python expression which should return a note less than 10 (10 is the highest
72 # note). You have access to the variables errors warning, statement which
73 # respectively contain the number of errors / warnings messages and the total
74 # number of statements analyzed. This is used by the global evaluation report
75 # (RP0004).
76 evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
77
78 # Template used to display messages. This is a python new-style format string
79 # used to format the message information. See doc for all details
80 #msg-template=
81
82 # Set the output format. Available formats are text, parseable, colorized, json
83 # and msvs (visual studio).You can also give a reporter class, eg
84 # mypackage.mymodule.MyReporterClass.
85 output-format=text
86
87 # Tells whether to display a full report or only the messages
88 reports=no
89
90 # Activate the evaluation score.
91 score=yes
92
93
94 [REFACTORING]
95
96 # Maximum number of nested blocks for function / method body
97 max-nested-blocks=5
98
99
100 [BASIC]
101
102 # Naming hint for argument names
103 argument-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
104
105 # Regular expression matching correct argument names
106 argument-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
107
108 # Naming hint for attribute names
109 attr-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
110
111 # Regular expression matching correct attribute names
112 attr-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
113
114 # Bad variable names which should always be refused, separated by a comma
115 bad-names=foo,bar,baz,toto,tutu,tata
116
117 # Naming hint for class attribute names
118 class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
119
120 # Regular expression matching correct class attribute names
121 class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
122
123 # Naming hint for class names
124 class-name-hint=[A-Z_][a-zA-Z0-9]+$
125
126 # Regular expression matching correct class names
127 class-rgx=[A-Z_][a-zA-Z0-9]+$
128
129 # Naming hint for constant names
130 const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
131
132 # Regular expression matching correct constant names
133 const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
134
135 # Minimum line length for functions/classes that require docstrings, shorter
136 # ones are exempt.
137 docstring-min-length=-1
138
139 # Naming hint for function names
140 function-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
141
142 # Regular expression matching correct function names
143 function-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
144
145 # Good variable names which should always be accepted, separated by a comma
146 good-names=i,j,k,ex,Run,_
147
148 # Include a hint for the correct naming format with invalid-name
149 include-naming-hint=no
150
151 # Naming hint for inline iteration names
152 inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
153
154 # Regular expression matching correct inline iteration names
155 inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
156
157 # Naming hint for method names
158 method-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
159
160 # Regular expression matching correct method names
161 method-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
162
163 # Naming hint for module names
164 module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
165
166 # Regular expression matching correct module names
167 module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
168
169 # Colon-delimited sets of names that determine each other's naming style when
170 # the name regexes allow several styles.
171 name-group=
172
173 # Regular expression which should only match function or class names that do
174 # not require a docstring.
175 no-docstring-rgx=^_
176
177 # List of decorators that produce properties, such as abc.abstractproperty. Add
178 # to this list to register other decorators that produce valid properties.
179 property-classes=abc.abstractproperty
180
181 # Naming hint for variable names
182 variable-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
183
184 # Regular expression matching correct variable names
185 variable-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
186
187
188 [FORMAT]
189
190 # Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
191 expected-line-ending-format=
192
193 # Regexp for a line that is allowed to be longer than the limit.
194 ignore-long-lines=^\s*(# )?<?https?://\S+>?$
195
196 # Number of spaces of indent required inside a hanging or continued line.
197 indent-after-paren=4
198
199 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
200 # tab).
201 indent-string=' '
202
203 # Maximum number of characters on a single line.
204 # TODO: Flawfinder specific - eventually we'll bring this down to 80
205 max-line-length=500
206
207 # Maximum number of lines in a module
208 # Flawfinder specific - we want this to be a single file
209 max-module-lines=5000
210
211 # List of optional constructs for which whitespace checking is disabled. `dict-
212 # separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
213 # `trailing-comma` allows a space between comma and closing bracket: (a, ).
214 # `empty-line` allows space-only lines.
215 no-space-check=trailing-comma,dict-separator
216
217 # Allow the body of a class to be on the same line as the declaration if body
218 # contains single statement.
219 single-line-class-stmt=no
220
221 # Allow the body of an if to be on the same line as the test if there is no
222 # else.
223 single-line-if-stmt=no
224
225
226 [LOGGING]
227
228 # Logging modules to check that the string format arguments are in logging
229 # function parameter format
230 logging-modules=logging
231
232
233 [MISCELLANEOUS]
234
235 # List of note tags to take in consideration, separated by a comma.
236 # notes=FIXME,XXX,TODO
237 # Flawfinder specifics: We already note them, no need to report
238 notes=
239
240
241 [SIMILARITIES]
242
243 # Ignore comments when computing similarities.
244 ignore-comments=yes
245
246 # Ignore docstrings when computing similarities.
247 ignore-docstrings=yes
248
249 # Ignore imports when computing similarities.
250 ignore-imports=no
251
252 # Minimum lines number of a similarity.
253 min-similarity-lines=4
254
255
256 [SPELLING]
257
258 # Spelling dictionary name. Available dictionaries: none. To make it working
259 # install python-enchant package.
260 spelling-dict=
261
262 # List of comma separated words that should not be checked.
263 spelling-ignore-words=
264
265 # A path to a file that contains private dictionary; one word per line.
266 spelling-private-dict-file=
267
268 # Tells whether to store unknown words to indicated private dictionary in
269 # --spelling-private-dict-file option instead of raising a message.
270 spelling-store-unknown-words=no
271
272
273 [TYPECHECK]
274
275 # List of decorators that produce context managers, such as
276 # contextlib.contextmanager. Add to this list to register other decorators that
277 # produce valid context managers.
278 contextmanager-decorators=contextlib.contextmanager
279
280 # List of members which are set dynamically and missed by pylint inference
281 # system, and so shouldn't trigger E1101 when accessed. Python regular
282 # expressions are accepted.
283 generated-members=
284
285 # Tells whether missing members accessed in mixin class should be ignored. A
286 # mixin class is detected if its name ends with "mixin" (case insensitive).
287 ignore-mixin-members=yes
288
289 # This flag controls whether pylint should warn about no-member and similar
290 # checks whenever an opaque object is returned when inferring. The inference
291 # can return multiple potential results while evaluating a Python object, but
292 # some branches might not be evaluated, which results in partial inference. In
293 # that case, it might be useful to still emit no-member and other checks for
294 # the rest of the inferred objects.
295 ignore-on-opaque-inference=yes
296
297 # List of class names for which member attributes should not be checked (useful
298 # for classes with dynamically set attributes). This supports the use of
299 # qualified names.
300 ignored-classes=optparse.Values,thread._local,_thread._local
301
302 # List of module names for which member attributes should not be checked
303 # (useful for modules/projects where namespaces are manipulated during runtime
304 # and thus existing member attributes cannot be deduced by static analysis. It
305 # supports qualified module names, as well as Unix pattern matching.
306 ignored-modules=
307
308 # Show a hint with possible names when a member name was not found. The aspect
309 # of finding the hint is based on edit distance.
310 missing-member-hint=yes
311
312 # The minimum edit distance a name should have in order to be considered a
313 # similar match for a missing member name.
314 missing-member-hint-distance=1
315
316 # The total number of similar names that should be taken in consideration when
317 # showing a hint for a missing member.
318 missing-member-max-choices=1
319
320
321 [VARIABLES]
322
323 # List of additional names supposed to be defined in builtins. Remember that
324 # you should avoid to define new builtins when possible.
325 additional-builtins=
326
327 # Tells whether unused global variables should be treated as a violation.
328 allow-global-unused-variables=yes
329
330 # List of strings which can identify a callback function by name. A callback
331 # name must start or end with one of those strings.
332 callbacks=cb_,_cb
333
334 # A regular expression matching the name of dummy variables (i.e. expectedly
335 # not used).
336 dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
337
338 # Argument names that match this expression will be ignored. Default to name
339 # with leading underscore
340 ignored-argument-names=_.*|^ignored_|^unused_
341
342 # Tells whether we should check for unused import in __init__ files.
343 init-import=no
344
345 # List of qualified module names which can have objects that can redefine
346 # builtins.
347 redefining-builtins-modules=six.moves,future.builtins
348
349
350 [CLASSES]
351
352 # List of method names used to declare (i.e. assign) instance attributes.
353 defining-attr-methods=__init__,__new__,setUp
354
355 # List of member names, which should be excluded from the protected access
356 # warning.
357 exclude-protected=_asdict,_fields,_replace,_source,_make
358
359 # List of valid names for the first argument in a class method.
360 valid-classmethod-first-arg=cls
361
362 # List of valid names for the first argument in a metaclass class method.
363 valid-metaclass-classmethod-first-arg=mcs
364
365
366 [DESIGN]
367
368 # Maximum number of arguments for function / method
369 max-args=5
370
371 # Maximum number of attributes for a class (see R0902).
372 max-attributes=7
373
374 # Maximum number of boolean expressions in a if statement
375 max-bool-expr=5
376
377 # Maximum number of branch for function / method body
378 max-branches=12
379
380 # Maximum number of locals for function / method body
381 max-locals=15
382
383 # Maximum number of parents for a class (see R0901).
384 max-parents=7
385
386 # Maximum number of public methods for a class (see R0904).
387 max-public-methods=20
388
389 # Maximum number of return / yield for function / method body
390 max-returns=6
391
392 # Maximum number of statements in function / method body
393 max-statements=50
394
395 # Minimum number of public methods for a class (see R0903).
396 min-public-methods=2
397
398
399 [IMPORTS]
400
401 # Allow wildcard imports from modules that define __all__.
402 allow-wildcard-with-all=no
403
404 # Analyse import fallback blocks. This can be used to support both Python 2 and
405 # 3 compatible code, which means that the block might have code that exists
406 # only in one or another interpreter, leading to false positives when analysed.
407 analyse-fallback-blocks=no
408
409 # Deprecated modules which should not be used, separated by a comma
410 deprecated-modules=regsub,TERMIOS,Bastion,rexec
411
412 # Create a graph of external dependencies in the given file (report RP0402 must
413 # not be disabled)
414 ext-import-graph=
415
416 # Create a graph of every (i.e. internal and external) dependencies in the
417 # given file (report RP0402 must not be disabled)
418 import-graph=
419
420 # Create a graph of internal dependencies in the given file (report RP0402 must
421 # not be disabled)
422 int-import-graph=
423
424 # Force import order to recognize a module as part of the standard
425 # compatibility libraries.
426 known-standard-library=
427
428 # Force import order to recognize a module as part of a third party library.
429 known-third-party=enchant
430
431
432 [EXCEPTIONS]
433
434 # Exceptions that will emit a warning when being caught. Defaults to
435 # "Exception"
436 overgeneral-exceptions=Exception