Debian Codegraph @

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