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-allow-list=apt_pkg,
7
8 # A comma-separated list of package or module names from where C extensions may
9 # be loaded. Extensions are loading into the active Python interpreter and may
10 # run arbitrary code. (This is an alternative name to extension-pkg-allow-list
11 # for backward compatibility.)
12 extension-pkg-whitelist=
13
14 # Return non-zero exit code if any of these messages/categories are detected,
15 # even if score is above --fail-under value. Syntax same as enable. Messages
16 # specified are enabled, while categories only check already-enabled messages.
17 fail-on=
18
19 # Specify a score threshold to be exceeded before program exits with error.
20 fail-under=10.0
21
22 # Files or directories to be skipped. They should be base names, not paths.
23 ignore=CVS
24
25 # Add files or directories matching the regex patterns to the ignore-list. The
26 # regex matches against paths and can be in Posix or Windows format.
27 ignore-paths=
28
29 # Files or directories matching the regex patterns are skipped. The regex
30 # matches against base names, not paths.
31 ignore-patterns=
32
33 # Python code to execute, usually for sys.path manipulation such as
34 # pygtk.require().
35 init-hook="import sys; sys.path.append('/usr/lib/python3/dist-packages')"
36
37 # Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
38 # number of processors available to use.
39 jobs=1
40
41 # Control the amount of potential inferred values when inferring a single
42 # object. This can help the performance when dealing with large functions or
43 # complex, nested conditions.
44 limit-inference-results=100
45
46 # List of plugins (as comma separated values of python module names) to load,
47 # usually to register additional checkers.
48 load-plugins=
49
50 # Pickle collected data for later comparisons.
51 persistent=yes
52
53 # Minimum Python version to use for version dependent checks. Will default to
54 # the version used to run pylint.
55 py-version=3.9
56
57 # When enabled, pylint would attempt to guess common misconfiguration and emit
58 # user-friendly hints instead of false-positive error messages.
59 suggestion-mode=yes
60
61 # Allow loading of arbitrary C extensions. Extensions are imported into the
62 # active Python interpreter and may run arbitrary code.
63 unsafe-load-any-extension=no
64
65
66 [MESSAGES CONTROL]
67
68 # Only show warnings with the listed confidence levels. Leave empty to show
69 # all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED.
70 confidence=
71
72 # Disable the message, report, category or checker with the given id(s). You
73 # can either give multiple identifiers separated by comma (,) or put this
74 # option multiple times (only on the command line, not in the configuration
75 # file where it should appear only once). You can also use "--disable=all" to
76 # disable everything first and then re-enable specific checks. For example, if
77 # you want to run only the similarities checker, you can use "--disable=all
78 # --enable=similarities". If you want to run only the classes checker, but have
79 # no Warning level messages displayed, use "--disable=all --enable=classes
80 # --disable=W".
81 disable=raw-checker-failed,
82 bad-inline-option,
83 locally-disabled,
84 file-ignored,
85 suppressed-message,
86 useless-suppression,
87 deprecated-pragma,
88 use-symbolic-message-instead,
89 logging-fstring-interpolation,
90 protected-access,
91 duplicate-code,
92 too-many-positional-arguments
93
94
95 # Enable the message, report, category or checker with the given id(s). You can
96 # either give multiple identifier separated by comma (,) or put this option
97 # multiple time (only on the command line, not in the configuration file where
98 # it should appear only once). See also the "--disable" option for examples.
99 enable=c-extension-no-member
100
101
102 [REPORTS]
103
104 # Python expression which should return a score less than or equal to 10. You
105 # have access to the variables 'error', 'warning', 'refactor', and 'convention'
106 # which contain the number of messages in each category, as well as 'statement'
107 # which is the total number of statements analyzed. This score is used by the
108 # global evaluation report (RP0004).
109 evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
110
111 # Template used to display messages. This is a python new-style format string
112 # used to format the message information. See doc for all details.
113 #msg-template=
114
115 # Set the output format. Available formats are text, parseable, colorized, json
116 # and msvs (visual studio). You can also give a reporter class, e.g.
117 # mypackage.mymodule.MyReporterClass.
118 output-format=text
119
120 # Tells whether to display a full report or only the messages.
121 reports=no
122
123 # Activate the evaluation score.
124 score=yes
125
126
127 [REFACTORING]
128
129 # Maximum number of nested blocks for function / method body
130 max-nested-blocks=5
131
132 # Complete name of functions that never returns. When checking for
133 # inconsistent-return-statements if a never returning function is called then
134 # it will be considered as an explicit return statement and no message will be
135 # printed.
136 never-returning-functions=sys.exit,argparse.parse_error
137
138
139 [TYPECHECK]
140
141 # List of decorators that produce context managers, such as
142 # contextlib.contextmanager. Add to this list to register other decorators that
143 # produce valid context managers.
144 contextmanager-decorators=contextlib.contextmanager
145
146 # List of members which are set dynamically and missed by pylint inference
147 # system, and so shouldn't trigger E1101 when accessed. Python regular
148 # expressions are accepted.
149 generated-members=
150
151 # Tells whether missing members accessed in mixin class should be ignored. A
152 # class is considered mixin if its name matches the mixin-class-rgx option.
153 ignore-mixin-members=yes
154
155 # Tells whether to warn about missing members when the owner of the attribute
156 # is inferred to be None.
157 ignore-none=yes
158
159 # This flag controls whether pylint should warn about no-member and similar
160 # checks whenever an opaque object is returned when inferring. The inference
161 # can return multiple potential results while evaluating a Python object, but
162 # some branches might not be evaluated, which results in partial inference. In
163 # that case, it might be useful to still emit no-member and other checks for
164 # the rest of the inferred objects.
165 ignore-on-opaque-inference=yes
166
167 # List of class names for which member attributes should not be checked (useful
168 # for classes with dynamically set attributes). This supports the use of
169 # qualified names.
170 ignored-classes=optparse.Values,thread._local,_thread._local
171
172 # List of module names for which member attributes should not be checked
173 # (useful for modules/projects where namespaces are manipulated during runtime
174 # and thus existing member attributes cannot be deduced by static analysis). It
175 # supports qualified module names, as well as Unix pattern matching.
176 ignored-modules=
177
178 # Show a hint with possible names when a member name was not found. The aspect
179 # of finding the hint is based on edit distance.
180 missing-member-hint=yes
181
182 # The minimum edit distance a name should have in order to be considered a
183 # similar match for a missing member name.
184 missing-member-hint-distance=1
185
186 # The total number of similar names that should be taken in consideration when
187 # showing a hint for a missing member.
188 missing-member-max-choices=1
189
190 # Regex pattern to define which classes are considered mixins ignore-mixin-
191 # members is set to 'yes'
192 mixin-class-rgx=.*[Mm]ixin
193
194 # List of decorators that change the signature of a decorated function.
195 signature-mutators=
196
197
198 [FORMAT]
199
200 # Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
201 expected-line-ending-format=
202
203 # Regexp for a line that is allowed to be longer than the limit.
204 ignore-long-lines=^\s*(# )?<?https?://\S+>?$
205
206 # Number of spaces of indent required inside a hanging or continued line.
207 indent-after-paren=4
208
209 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
210 # tab).
211 indent-string="\t"
212
213 # Maximum number of characters on a single line.
214 max-line-length=100
215
216 # Maximum number of lines in a module.
217 max-module-lines=1000
218
219 # Allow the body of a class to be on the same line as the declaration if body
220 # contains single statement.
221 single-line-class-stmt=no
222
223 # Allow the body of an if to be on the same line as the test if there is no
224 # else.
225 single-line-if-stmt=no
226
227
228 [LOGGING]
229
230 # The type of string formatting that logging methods do. `old` means using %
231 # formatting, `new` is for `{}` formatting.
232 logging-format-style=new
233
234 # Logging modules to check that the string format arguments are in logging
235 # function parameter format.
236 logging-modules=logging
237
238
239 [SPELLING]
240
241 # Limits count of emitted suggestions for spelling mistakes.
242 max-spelling-suggestions=4
243
244 # Spelling dictionary name. Available dictionaries: none. To make it work,
245 # install the 'python-enchant' package.
246 spelling-dict=
247
248 # List of comma separated words that should be considered directives if they
249 # appear and the beginning of a comment and should not be checked.
250 spelling-ignore-comment-directives=fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy:
251
252 # List of comma separated words that should not be checked.
253 spelling-ignore-words=
254
255 # A path to a file that contains the private dictionary; one word per line.
256 spelling-private-dict-file=
257
258 # Tells whether to store unknown words to the private dictionary (see the
259 # --spelling-private-dict-file option) instead of raising a message.
260 spelling-store-unknown-words=no
261
262
263 [STRING]
264
265 # This flag controls whether inconsistent-quotes generates a warning when the
266 # character used as a quote delimiter is used inconsistently within a module.
267 check-quote-consistency=no
268
269 # This flag controls whether the implicit-str-concat should generate a warning
270 # on implicit string concatenation in sequences defined over several lines.
271 check-str-concat-over-line-jumps=no
272
273
274 [BASIC]
275
276 # Naming style matching correct argument names.
277 argument-naming-style=snake_case
278
279 # Regular expression matching correct argument names. Overrides argument-
280 # naming-style.
281 #argument-rgx=
282
283 # Naming style matching correct attribute names.
284 attr-naming-style=snake_case
285
286 # Regular expression matching correct attribute names. Overrides attr-naming-
287 # style.
288 #attr-rgx=
289
290 # Bad variable names which should always be refused, separated by a comma.
291 bad-names= foo,
292 bar,
293 baz,
294 toto,
295 tutu,
296 tata
297
298 # Bad variable names regexes, separated by a comma. If names match any regex,
299 # they will always be refused
300 bad-names-rgxs=
301
302 # Naming style matching correct class attribute names.
303 class-attribute-naming-style=any
304
305 # Regular expression matching correct class attribute names. Overrides class-
306 # attribute-naming-style.
307 #class-attribute-rgx=
308
309 # Naming style matching correct class constant names.
310 class-const-naming-style=UPPER_CASE
311
312 # Regular expression matching correct class constant names. Overrides class-
313 # const-naming-style.
314 #class-const-rgx=
315
316 # Naming style matching correct class names.
317 class-naming-style=PascalCase
318
319 # Regular expression matching correct class names. Overrides class-naming-
320 # style.
321 #class-rgx=
322
323 # Naming style matching correct constant names.
324 const-naming-style=UPPER_CASE
325
326 # Regular expression matching correct constant names. Overrides const-naming-
327 # style.
328 #const-rgx=
329
330 # Minimum line length for functions/classes that require docstrings, shorter
331 # ones are exempt.
332 docstring-min-length=-1
333
334 # Naming style matching correct function names.
335 function-naming-style=snake_case
336
337 # Regular expression matching correct function names. Overrides function-
338 # naming-style.
339 #function-rgx=
340
341 # Good variable names which should always be accepted, separated by a comma.
342 good-names= i,
343 j,
344 k,
345 ex,
346 Run,
347 _
348
349 # Good variable names regexes, separated by a comma. If names match any regex,
350 # they will always be accepted
351 good-names-rgxs=
352
353 # Include a hint for the correct naming format with invalid-name.
354 include-naming-hint=no
355
356 # Naming style matching correct inline iteration names.
357 inlinevar-naming-style=any
358
359 # Regular expression matching correct inline iteration names. Overrides
360 # inlinevar-naming-style.
361 #inlinevar-rgx=
362
363 # Naming style matching correct method names.
364 method-naming-style=snake_case
365
366 # Regular expression matching correct method names. Overrides method-naming-
367 # style.
368 #method-rgx=
369
370 # Naming style matching correct module names.
371 module-naming-style=snake_case
372
373 # Regular expression matching correct module names. Overrides module-naming-
374 # style.
375 #module-rgx=
376
377 # Colon-delimited sets of names that determine each other's naming style when
378 # the name regexes allow several styles.
379 name-group=
380
381 # Regular expression which should only match function or class names that do
382 # not require a docstring.
383 no-docstring-rgx=^_
384
385 # List of decorators that produce properties, such as abc.abstractproperty. Add
386 # to this list to register other decorators that produce valid properties.
387 # These decorators are taken in consideration only for invalid-name.
388 property-classes=abc.abstractproperty
389
390 # Naming style matching correct variable names.
391 variable-naming-style=snake_case
392
393 # Regular expression matching correct variable names. Overrides variable-
394 # naming-style.
395 #variable-rgx=
396
397
398 [MISCELLANEOUS]
399
400 # List of note tags to take in consideration, separated by a comma.
401 notes= FIXME,
402 XXX,
403 TODO
404
405 # Regular expression of note tags to take in consideration.
406 #notes-rgx=
407
408
409 [VARIABLES]
410
411 # List of additional names supposed to be defined in builtins. Remember that
412 # you should avoid defining new builtins when possible.
413 additional-builtins=
414
415 # Tells whether unused global variables should be treated as a violation.
416 allow-global-unused-variables=yes
417
418 # List of names allowed to shadow builtins
419 allowed-redefined-builtins=
420
421 # List of strings which can identify a callback function by name. A callback
422 # name must start or end with one of those strings.
423 callbacks= cb_,
424 _cb
425
426 # A regular expression matching the name of dummy variables (i.e. expected to
427 # not be used).
428 dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
429
430 # Argument names that match this expression will be ignored. Default to name
431 # with leading underscore.
432 ignored-argument-names=_.*|^ignored_|^unused_
433
434 # Tells whether we should check for unused import in __init__ files.
435 init-import=no
436
437 # List of qualified module names which can have objects that can redefine
438 # builtins.
439 redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
440
441
442 [SIMILARITIES]
443
444 # Comments are removed from the similarity computation
445 ignore-comments=yes
446
447 # Docstrings are removed from the similarity computation
448 ignore-docstrings=yes
449
450 # Imports are removed from the similarity computation
451 ignore-imports=no
452
453 # Signatures are removed from the similarity computation
454 ignore-signatures=no
455
456 # Minimum lines number of a similarity.
457 min-similarity-lines=4
458
459
460 [DESIGN]
461
462 # List of regular expressions of class ancestor names to ignore when counting
463 # public methods (see R0903)
464 exclude-too-few-public-methods=
465
466 # List of qualified class names to ignore when counting class parents (see
467 # R0901)
468 ignored-parents=
469
470 # Maximum number of arguments for function / method.
471 max-args=5
472
473 # Maximum number of attributes for a class (see R0902).
474 max-attributes=7
475
476 # Maximum number of boolean expressions in an if statement (see R0916).
477 max-bool-expr=5
478
479 # Maximum number of branch for function / method body.
480 max-branches=12
481
482 # Maximum number of locals for function / method body.
483 max-locals=15
484
485 # Maximum number of parents for a class (see R0901).
486 max-parents=7
487
488 # Maximum number of public methods for a class (see R0904).
489 max-public-methods=20
490
491 # Maximum number of return / yield for function / method body.
492 max-returns=6
493
494 # Maximum number of statements in function / method body.
495 max-statements=50
496
497 # Minimum number of public methods for a class (see R0903).
498 min-public-methods=2
499
500
501 [CLASSES]
502
503 # Warn about protected attribute access inside special methods
504 check-protected-access-in-special-methods=no
505
506 # List of method names used to declare (i.e. assign) instance attributes.
507 defining-attr-methods= __init__,
508 __new__,
509 setUp,
510 __post_init__
511
512 # List of member names, which should be excluded from the protected access
513 # warning.
514 exclude-protected= _asdict,
515 _fields,
516 _replace,
517 _source,
518 _make
519
520 # List of valid names for the first argument in a class method.
521 valid-classmethod-first-arg=cls
522
523 # List of valid names for the first argument in a metaclass class method.
524 valid-metaclass-classmethod-first-arg=cls
525
526
527 [IMPORTS]
528
529 # List of modules that can be imported at any level, not just the top level
530 # one.
531 allow-any-import-level=
532
533 # Allow wildcard imports from modules that define __all__.
534 allow-wildcard-with-all=no
535
536 # Analyse import fallback blocks. This can be used to support both Python 2 and
537 # 3 compatible code, which means that the block might have code that exists
538 # only in one or another interpreter, leading to false positives when analysed.
539 analyse-fallback-blocks=no
540
541 # Deprecated modules which should not be used, separated by a comma.
542 deprecated-modules=
543
544 # Output a graph (.gv or any supported image format) of external dependencies
545 # to the given file (report RP0402 must not be disabled).
546 ext-import-graph=
547
548 # Output a graph (.gv or any supported image format) of all (i.e. internal and
549 # external) dependencies to the given file (report RP0402 must not be
550 # disabled).
551 import-graph=
552
553 # Output a graph (.gv or any supported image format) of internal dependencies
554 # to the given file (report RP0402 must not be disabled).
555 int-import-graph=
556
557 # Force import order to recognize a module as part of the standard
558 # compatibility libraries.
559 known-standard-library=
560
561 # Force import order to recognize a module as part of a third party library.
562 known-third-party=enchant
563
564 # Couples of modules and preferred modules, separated by a comma.
565 preferred-modules=
566
567
568 [EXCEPTIONS]
569
570 # Exceptions that will emit a warning when being caught. Defaults to
571 # "BaseException, Exception".
572 overgeneral-exceptions= builtins.Exception