Debian Codegraph @

ansible_collections/community/crypto/.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=yes
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 = ^_{0,2}(?!T[A-Z]|Type)[A-Z]+[a-z0-9]+(?:[A-Z][a-z0-9]+)*T?$
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-arguments,
365 too-many-boolean-expressions,
366 too-many-branches,
367 too-many-function-args,
368 too-many-instance-attributes,
369 too-many-lines,
370 too-many-locals,
371 too-many-nested-blocks,
372 too-many-positional-arguments,
373 too-many-return-statements,
374 too-many-statements,
375 ungrouped-imports,
376 useless-parent-delegation,
377 wrong-import-order,
378 wrong-import-position,
379 # To clean up:
380 broad-exception-caught,
381 broad-exception-raised,
382 fixme,
383 unused-argument,
384 # Cannot remove yet due to inadequacy of rules
385 inconsistent-return-statements, # doesn't notice that fail_json() does not return
386
387 # Enable the message, report, category or checker with the given id(s). You can
388 # either give multiple identifier separated by comma (,) or put this option
389 # multiple time (only on the command line, not in the configuration file where
390 # it should appear only once). See also the "--disable" option for examples.
391 enable=
392
393
394 [METHOD_ARGS]
395
396 # List of qualified names (i.e., library.method) which require a timeout
397 # parameter e.g. 'requests.api.get,requests.api.post'
398 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
399
400
401 [MISCELLANEOUS]
402
403 # List of note tags to take in consideration, separated by a comma.
404 notes=FIXME,
405 XXX,
406 TODO
407
408 # Regular expression of note tags to take in consideration.
409 notes-rgx=
410
411
412 [REFACTORING]
413
414 # Maximum number of nested blocks for function / method body
415 max-nested-blocks=5
416
417 # Complete name of functions that never returns. When checking for
418 # inconsistent-return-statements if a never returning function is called then
419 # it will be considered as an explicit return statement and no message will be
420 # printed.
421 never-returning-functions=sys.exit,argparse.parse_error
422
423 # Let 'consider-using-join' be raised when the separator to join on would be
424 # non-empty (resulting in expected fixes of the type: ``"- " + " -
425 # ".join(items)``)
426 suggest-join-with-non-empty-separator=yes
427
428
429 [REPORTS]
430
431 # Python expression which should return a score less than or equal to 10. You
432 # have access to the variables 'fatal', 'error', 'warning', 'refactor',
433 # 'convention', and 'info' which contain the number of messages in each
434 # category, as well as 'statement' which is the total number of statements
435 # analyzed. This score is used by the global evaluation report (RP0004).
436 evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10))
437
438 # Template used to display messages. This is a python new-style format string
439 # used to format the message information. See doc for all details.
440 msg-template=
441
442 # Set the output format. Available formats are: text, parseable, colorized,
443 # json2 (improved json format), json (old json format) and msvs (visual
444 # studio). You can also give a reporter class, e.g.
445 # mypackage.mymodule.MyReporterClass.
446 #output-format=
447
448 # Tells whether to display a full report or only the messages.
449 reports=no
450
451 # Activate the evaluation score.
452 score=yes
453
454
455 [SIMILARITIES]
456
457 # Comments are removed from the similarity computation
458 ignore-comments=yes
459
460 # Docstrings are removed from the similarity computation
461 ignore-docstrings=yes
462
463 # Imports are removed from the similarity computation
464 ignore-imports=yes
465
466 # Signatures are removed from the similarity computation
467 ignore-signatures=yes
468
469 # Minimum lines number of a similarity.
470 min-similarity-lines=4
471
472
473 [SPELLING]
474
475 # Limits count of emitted suggestions for spelling mistakes.
476 max-spelling-suggestions=4
477
478 # Spelling dictionary name. No available dictionaries : You need to install
479 # both the python package and the system dependency for enchant to work.
480 spelling-dict=
481
482 # List of comma separated words that should be considered directives if they
483 # appear at the beginning of a comment and should not be checked.
484 spelling-ignore-comment-directives=fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy:
485
486 # List of comma separated words that should not be checked.
487 spelling-ignore-words=
488
489 # A path to a file that contains the private dictionary; one word per line.
490 spelling-private-dict-file=
491
492 # Tells whether to store unknown words to the private dictionary (see the
493 # --spelling-private-dict-file option) instead of raising a message.
494 spelling-store-unknown-words=no
495
496
497 [STRING]
498
499 # This flag controls whether inconsistent-quotes generates a warning when the
500 # character used as a quote delimiter is used inconsistently within a module.
501 check-quote-consistency=no
502
503 # This flag controls whether the implicit-str-concat should generate a warning
504 # on implicit string concatenation in sequences defined over several lines.
505 check-str-concat-over-line-jumps=no
506
507
508 [TYPECHECK]
509
510 # List of decorators that produce context managers, such as
511 # contextlib.contextmanager. Add to this list to register other decorators that
512 # produce valid context managers.
513 contextmanager-decorators=contextlib.contextmanager
514
515 # List of members which are set dynamically and missed by pylint inference
516 # system, and so shouldn't trigger E1101 when accessed. Python regular
517 # expressions are accepted.
518 generated-members=
519
520 # Tells whether to warn about missing members when the owner of the attribute
521 # is inferred to be None.
522 ignore-none=yes
523
524 # This flag controls whether pylint should warn about no-member and similar
525 # checks whenever an opaque object is returned when inferring. The inference
526 # can return multiple potential results while evaluating a Python object, but
527 # some branches might not be evaluated, which results in partial inference. In
528 # that case, it might be useful to still emit no-member and other checks for
529 # the rest of the inferred objects.
530 ignore-on-opaque-inference=yes
531
532 # List of symbolic message names to ignore for Mixin members.
533 ignored-checks-for-mixins=no-member,
534 not-async-context-manager,
535 not-context-manager,
536 attribute-defined-outside-init
537
538 # List of class names for which member attributes should not be checked (useful
539 # for classes with dynamically set attributes). This supports the use of
540 # qualified names.
541 ignored-classes=optparse.Values,thread._local,_thread._local,argparse.Namespace
542
543 # Show a hint with possible names when a member name was not found. The aspect
544 # of finding the hint is based on edit distance.
545 missing-member-hint=yes
546
547 # The minimum edit distance a name should have in order to be considered a
548 # similar match for a missing member name.
549 missing-member-hint-distance=1
550
551 # The total number of similar names that should be taken in consideration when
552 # showing a hint for a missing member.
553 missing-member-max-choices=1
554
555 # Regex pattern to define which classes are considered mixins.
556 mixin-class-rgx=.*[Mm]ixin
557
558 # List of decorators that change the signature of a decorated function.
559 signature-mutators=
560
561
562 [VARIABLES]
563
564 # List of additional names supposed to be defined in builtins. Remember that
565 # you should avoid defining new builtins when possible.
566 additional-builtins=
567
568 # Tells whether unused global variables should be treated as a violation.
569 allow-global-unused-variables=yes
570
571 # List of names allowed to shadow builtins
572 allowed-redefined-builtins=
573
574 # List of strings which can identify a callback function by name. A callback
575 # name must start or end with one of those strings.
576 callbacks=cb_,
577 _cb
578
579 # A regular expression matching the name of dummy variables (i.e. expected to
580 # not be used).
581 dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
582
583 # Argument names that match this expression will be ignored.
584 ignored-argument-names=_.*|^ignored_|^unused_
585
586 # Tells whether we should check for unused import in __init__ files.
587 init-import=no
588
589 # List of qualified module names which can have objects that can redefine
590 # builtins.
591 redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io