Debian Codegraph @

.pylintrc

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