Debian Codegraph @

pylintrc

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