Debian Codegraph @

ansible_collections/community/docker/.pylintrc

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