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 # When enabled, pylint would attempt to guess common misconfiguration and emit
97 # user-friendly hints instead of false-positive error messages.
98 suggestion-mode=yes
99
100 # Allow loading of arbitrary C extensions. Extensions are imported into the
101 # active Python interpreter and may run arbitrary code.
102 unsafe-load-any-extension=no
103
104 # In verbose mode, extra non-checker-related info will be displayed.
105 #verbose=
106
107
108 [BASIC]
109
110 # Naming style matching correct argument names.
111 argument-naming-style=snake_case
112
113 # Regular expression matching correct argument names. Overrides argument-
114 # naming-style. If left empty, argument names will be checked with the set
115 # naming style.
116 #argument-rgx=
117
118 # Naming style matching correct attribute names.
119 attr-naming-style=snake_case
120
121 # Regular expression matching correct attribute names. Overrides attr-naming-
122 # style. If left empty, attribute names will be checked with the set naming
123 # style.
124 #attr-rgx=
125
126 # Bad variable names which should always be refused, separated by a comma.
127 bad-names=foo,
128 bar,
129 baz,
130 toto,
131 tutu,
132 tata
133
134 # Bad variable names regexes, separated by a comma. If names match any regex,
135 # they will always be refused
136 bad-names-rgxs=
137
138 # Naming style matching correct class attribute names.
139 class-attribute-naming-style=any
140
141 # Regular expression matching correct class attribute names. Overrides class-
142 # attribute-naming-style. If left empty, class attribute names will be checked
143 # with the set naming style.
144 #class-attribute-rgx=
145
146 # Naming style matching correct class constant names.
147 class-const-naming-style=UPPER_CASE
148
149 # Regular expression matching correct class constant names. Overrides class-
150 # const-naming-style. If left empty, class constant names will be checked with
151 # the set naming style.
152 #class-const-rgx=
153
154 # Naming style matching correct class names.
155 class-naming-style=PascalCase
156
157 # Regular expression matching correct class names. Overrides class-naming-
158 # style. If left empty, class names will be checked with the set naming style.
159 #class-rgx=
160
161 # Naming style matching correct constant names.
162 const-naming-style=UPPER_CASE
163
164 # Regular expression matching correct constant names. Overrides const-naming-
165 # style. If left empty, constant names will be checked with the set naming
166 # style.
167 #const-rgx=
168
169 # Minimum line length for functions/classes that require docstrings, shorter
170 # ones are exempt.
171 docstring-min-length=-1
172
173 # Naming style matching correct function names.
174 function-naming-style=snake_case
175
176 # Regular expression matching correct function names. Overrides function-
177 # naming-style. If left empty, function names will be checked with the set
178 # naming style.
179 #function-rgx=
180
181 # Good variable names which should always be accepted, separated by a comma.
182 good-names=i,
183 j,
184 k,
185 ex,
186 Run,
187 _
188
189 # Good variable names regexes, separated by a comma. If names match any regex,
190 # they will always be accepted
191 good-names-rgxs=
192
193 # Include a hint for the correct naming format with invalid-name.
194 include-naming-hint=no
195
196 # Naming style matching correct inline iteration names.
197 inlinevar-naming-style=any
198
199 # Regular expression matching correct inline iteration names. Overrides
200 # inlinevar-naming-style. If left empty, inline iteration names will be checked
201 # with the set naming style.
202 #inlinevar-rgx=
203
204 # Naming style matching correct method names.
205 method-naming-style=snake_case
206
207 # Regular expression matching correct method names. Overrides method-naming-
208 # style. If left empty, method names will be checked with the set naming style.
209 #method-rgx=
210
211 # Naming style matching correct module names.
212 module-naming-style=snake_case
213
214 # Regular expression matching correct module names. Overrides module-naming-
215 # style. If left empty, module names will be checked with the set naming style.
216 #module-rgx=
217
218 # Colon-delimited sets of names that determine each other's naming style when
219 # the name regexes allow several styles.
220 name-group=
221
222 # Regular expression which should only match function or class names that do
223 # not require a docstring.
224 no-docstring-rgx=^_
225
226 # List of decorators that produce properties, such as abc.abstractproperty. Add
227 # to this list to register other decorators that produce valid properties.
228 # These decorators are taken in consideration only for invalid-name.
229 property-classes=abc.abstractproperty
230
231 # Regular expression matching correct type variable names. If left empty, type
232 # variable names will be checked with the set naming style.
233 #typevar-rgx=
234
235 # Naming style matching correct variable names.
236 variable-naming-style=snake_case
237
238 # Regular expression matching correct variable names. Overrides variable-
239 # naming-style. If left empty, variable names will be checked with the set
240 # naming style.
241 #variable-rgx=
242
243
244 [CLASSES]
245
246 # Warn about protected attribute access inside special methods
247 check-protected-access-in-special-methods=no
248
249 # List of method names used to declare (i.e. assign) instance attributes.
250 defining-attr-methods=__init__,
251 __new__,
252 setUp,
253 __post_init__
254
255 # List of member names, which should be excluded from the protected access
256 # warning.
257 exclude-protected=_asdict,
258 _fields,
259 _replace,
260 _source,
261 _make
262
263 # List of valid names for the first argument in a class method.
264 valid-classmethod-first-arg=cls
265
266 # List of valid names for the first argument in a metaclass class method.
267 valid-metaclass-classmethod-first-arg=mcs
268
269
270 [DESIGN]
271
272 # List of regular expressions of class ancestor names to ignore when counting
273 # public methods (see R0903)
274 exclude-too-few-public-methods=
275
276 # List of qualified class names to ignore when counting class parents (see
277 # R0901)
278 ignored-parents=
279
280 # Maximum number of arguments for function / method.
281 max-args=20
282
283 # Maximum number of attributes for a class (see R0902).
284 max-attributes=16
285
286 # Maximum number of boolean expressions in an if statement (see R0916).
287 max-bool-expr=5
288
289 # Maximum number of branch for function / method body.
290 max-branches=12
291
292 # Maximum number of locals for function / method body.
293 max-locals=100
294
295 # Maximum number of parents for a class (see R0901).
296 max-parents=7
297
298 # Maximum number of public methods for a class (see R0904).
299 max-public-methods=45
300
301 # Maximum number of return / yield for function / method body.
302 max-returns=6
303
304 # Maximum number of statements in function / method body.
305 max-statements=100
306
307 # Minimum number of public methods for a class (see R0903).
308 min-public-methods=1
309
310
311 [EXCEPTIONS]
312
313 # Exceptions that will emit a warning when caught.
314 overgeneral-exceptions=builtins.BaseException,builtins.Exception
315
316
317 [FORMAT]
318
319 # Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
320 expected-line-ending-format=
321
322 # Regexp for a line that is allowed to be longer than the limit.
323 ignore-long-lines=^\s*(# )?<?https?://\S+>?$
324
325 # Number of spaces of indent required inside a hanging or continued line.
326 indent-after-paren=4
327
328 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
329 # tab).
330 indent-string=' '
331
332 # Maximum number of characters on a single line.
333 max-line-length=100
334
335 # Maximum number of lines in a module.
336 max-module-lines=1000
337
338 # Allow the body of a class to be on the same line as the declaration if body
339 # contains single statement.
340 single-line-class-stmt=no
341
342 # Allow the body of an if to be on the same line as the test if there is no
343 # else.
344 single-line-if-stmt=no
345
346
347 [IMPORTS]
348
349 # List of modules that can be imported at any level, not just the top level
350 # one.
351 allow-any-import-level=
352
353 # Allow explicit reexports by alias from a package __init__.
354 allow-reexport-from-package=no
355
356 # Allow wildcard imports from modules that define __all__.
357 allow-wildcard-with-all=no
358
359 # Deprecated modules which should not be used, separated by a comma.
360 deprecated-modules=
361
362 # Output a graph (.gv or any supported image format) of external dependencies
363 # to the given file (report RP0402 must not be disabled).
364 ext-import-graph=
365
366 # Output a graph (.gv or any supported image format) of all (i.e. internal and
367 # external) dependencies to the given file (report RP0402 must not be
368 # disabled).
369 import-graph=
370
371 # Output a graph (.gv or any supported image format) of internal dependencies
372 # to the given file (report RP0402 must not be disabled).
373 int-import-graph=
374
375 # Force import order to recognize a module as part of the standard
376 # compatibility libraries.
377 known-standard-library=
378
379 # Force import order to recognize a module as part of a third party library.
380 known-third-party=enchant
381
382 # Couples of modules and preferred modules, separated by a comma.
383 preferred-modules=
384
385
386 [LOGGING]
387
388 # The type of string formatting that logging methods do. `old` means using %
389 # formatting, `new` is for `{}` formatting.
390 logging-format-style=old
391
392 # Logging modules to check that the string format arguments are in logging
393 # function parameter format.
394 logging-modules=logging
395
396
397 [MESSAGES CONTROL]
398
399 # Only show warnings with the listed confidence levels. Leave empty to show
400 # all. Valid levels: HIGH, CONTROL_FLOW, INFERENCE, INFERENCE_FAILURE,
401 # UNDEFINED.
402 confidence=HIGH,
403 CONTROL_FLOW,
404 INFERENCE,
405 INFERENCE_FAILURE,
406 UNDEFINED
407
408 # Disable the message, report, category or checker with the given id(s). You
409 # can either give multiple identifiers separated by comma (,) or put this
410 # option multiple times (only on the command line, not in the configuration
411 # file where it should appear only once). You can also use "--disable=all" to
412 # disable everything first and then re-enable specific checks. For example, if
413 # you want to run only the similarities checker, you can use "--disable=all
414 # --enable=similarities". If you want to run only the classes checker, but have
415 # no Warning level messages displayed, use "--disable=all --enable=classes
416 # --disable=W".
417 ##
418 # there is nothing wrong with messages up until line-too-long
419 # at the moment I prefer not to fix them
420 # XXX no-member does not seem to work for astropy.units, so disabling it for now
421 # XXX fixme <- remove for a moment
422 disable=too-many-positional-arguments,
423 invalid-name,
424 unused-argument,
425 missing-function-docstring,
426 R0801,
427 no-member,
428 line-too-long
429
430
431 # Enable the message, report, category or checker with the given id(s). You can
432 # either give multiple identifier separated by comma (,) or put this option
433 # multiple time (only on the command line, not in the configuration file where
434 # it should appear only once). See also the "--disable" option for examples.
435 enable=c-extension-no-member
436
437
438 [METHOD_ARGS]
439
440 # List of qualified names (i.e., library.method) which require a timeout
441 # parameter e.g. 'requests.api.get,requests.api.post'
442 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
443
444
445 [MISCELLANEOUS]
446
447 # List of note tags to take in consideration, separated by a comma.
448 notes=FIXME,
449 XXX,
450 TODO
451
452 # Regular expression of note tags to take in consideration.
453 notes-rgx=
454
455
456 [REFACTORING]
457
458 # Maximum number of nested blocks for function / method body
459 max-nested-blocks=5
460
461 # Complete name of functions that never returns. When checking for
462 # inconsistent-return-statements if a never returning function is called then
463 # it will be considered as an explicit return statement and no message will be
464 # printed.
465 never-returning-functions=sys.exit,argparse.parse_error
466
467
468 [REPORTS]
469
470 # Python expression which should return a score less than or equal to 10. You
471 # have access to the variables 'fatal', 'error', 'warning', 'refactor',
472 # 'convention', and 'info' which contain the number of messages in each
473 # category, as well as 'statement' which is the total number of statements
474 # analyzed. This score is used by the global evaluation report (RP0004).
475 evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10))
476
477 # Template used to display messages. This is a python new-style format string
478 # used to format the message information. See doc for all details.
479 msg-template=
480
481 # Set the output format. Available formats are text, parseable, colorized, json
482 # and msvs (visual studio). You can also give a reporter class, e.g.
483 # mypackage.mymodule.MyReporterClass.
484 #output-format=
485
486 # Tells whether to display a full report or only the messages.
487 reports=no
488
489 # Activate the evaluation score.
490 score=yes
491
492
493 [SIMILARITIES]
494
495 # Comments are removed from the similarity computation
496 ignore-comments=yes
497
498 # Docstrings are removed from the similarity computation
499 ignore-docstrings=yes
500
501 # Imports are removed from the similarity computation
502 ignore-imports=yes
503
504 # Signatures are removed from the similarity computation
505 ignore-signatures=yes
506
507 # Minimum lines number of a similarity.
508 min-similarity-lines=4
509
510
511 [SPELLING]
512
513 # Limits count of emitted suggestions for spelling mistakes.
514 max-spelling-suggestions=4
515
516 # Spelling dictionary name. Available dictionaries: none. To make it work,
517 # install the 'python-enchant' package.
518 spelling-dict=
519
520 # List of comma separated words that should be considered directives if they
521 # appear at the beginning of a comment and should not be checked.
522 spelling-ignore-comment-directives=fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy:
523
524 # List of comma separated words that should not be checked.
525 spelling-ignore-words=
526
527 # A path to a file that contains the private dictionary; one word per line.
528 spelling-private-dict-file=
529
530 # Tells whether to store unknown words to the private dictionary (see the
531 # --spelling-private-dict-file option) instead of raising a message.
532 spelling-store-unknown-words=no
533
534
535 [STRING]
536
537 # This flag controls whether inconsistent-quotes generates a warning when the
538 # character used as a quote delimiter is used inconsistently within a module.
539 check-quote-consistency=no
540
541 # This flag controls whether the implicit-str-concat should generate a warning
542 # on implicit string concatenation in sequences defined over several lines.
543 check-str-concat-over-line-jumps=no
544
545
546 [TYPECHECK]
547
548 # List of decorators that produce context managers, such as
549 # contextlib.contextmanager. Add to this list to register other decorators that
550 # produce valid context managers.
551 contextmanager-decorators=contextlib.contextmanager
552
553 # List of members which are set dynamically and missed by pylint inference
554 # system, and so shouldn't trigger E1101 when accessed. Python regular
555 # expressions are accepted.
556 generated-members=
557
558 # Tells whether to warn about missing members when the owner of the attribute
559 # is inferred to be None.
560 ignore-none=yes
561
562 # This flag controls whether pylint should warn about no-member and similar
563 # checks whenever an opaque object is returned when inferring. The inference
564 # can return multiple potential results while evaluating a Python object, but
565 # some branches might not be evaluated, which results in partial inference. In
566 # that case, it might be useful to still emit no-member and other checks for
567 # the rest of the inferred objects.
568 ignore-on-opaque-inference=yes
569
570 # List of symbolic message names to ignore for Mixin members.
571 ignored-checks-for-mixins=no-member,
572 not-async-context-manager,
573 not-context-manager,
574 attribute-defined-outside-init
575
576 # List of class names for which member attributes should not be checked (useful
577 # for classes with dynamically set attributes). This supports the use of
578 # qualified names.
579 ignored-classes=optparse.Values,thread._local,_thread._local,argparse.Namespace
580
581 # Show a hint with possible names when a member name was not found. The aspect
582 # of finding the hint is based on edit distance.
583 missing-member-hint=yes
584
585 # The minimum edit distance a name should have in order to be considered a
586 # similar match for a missing member name.
587 missing-member-hint-distance=1
588
589 # The total number of similar names that should be taken in consideration when
590 # showing a hint for a missing member.
591 missing-member-max-choices=1
592
593 # Regex pattern to define which classes are considered mixins.
594 mixin-class-rgx=.*[Mm]ixin
595
596 # List of decorators that change the signature of a decorated function.
597 signature-mutators=
598
599
600 [VARIABLES]
601
602 # List of additional names supposed to be defined in builtins. Remember that
603 # you should avoid defining new builtins when possible.
604 additional-builtins=
605
606 # Tells whether unused global variables should be treated as a violation.
607 allow-global-unused-variables=yes
608
609 # List of names allowed to shadow builtins
610 allowed-redefined-builtins=
611
612 # List of strings which can identify a callback function by name. A callback
613 # name must start or end with one of those strings.
614 callbacks=cb_,
615 _cb
616
617 # A regular expression matching the name of dummy variables (i.e. expected to
618 # not be used).
619 dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
620
621 # Argument names that match this expression will be ignored.
622 ignored-argument-names=_.*|^ignored_|^unused_
623
624 # Tells whether we should check for unused import in __init__ files.
625 init-import=no
626
627 # List of qualified module names which can have objects that can redefine
628 # builtins.
629 redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io