Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / third_party / pigweed / repo / .pylintrc
1 [MASTER]
2
3 # A comma-separated list of package or module names from where C extensions may
4 # be loaded. Extensions are loading into the active Python interpreter and may
5 # run arbitrary code.
6 # TODO(pwbug/280) Change "whitelist" to "allowlist". (Blocked on pylint.)
7 extension-pkg-whitelist=mypy
8
9 # Add files or directories to the blocklist. They should be base names, not
10 # paths.
11 ignore=CVS
12
13 # Add files or directories matching the regex patterns to the blocklist. The
14 # regex matches against base names, not paths.
15 ignore-patterns=
16
17 # Python code to execute, usually for sys.path manipulation such as
18 # pygtk.require().
19 #init-hook=
20
21 # Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
22 # number of processors available to use.
23 jobs=0
24
25 # Control the amount of potential inferred values when inferring a single
26 # object. This can help the performance when dealing with large functions or
27 # complex, nested conditions.
28 limit-inference-results=100
29
30 # List of plugins (as comma separated values of python module names) to load,
31 # usually to register additional checkers.
32 load-plugins=
33
34 # Pickle collected data for later comparisons.
35 persistent=yes
36
37 # Specify a configuration file.
38 #rcfile=
39
40 # When enabled, pylint would attempt to guess common misconfiguration and emit
41 # user-friendly hints instead of false-positive error messages.
42 suggestion-mode=yes
43
44 # Allow loading of arbitrary C extensions. Extensions are imported into the
45 # active Python interpreter and may run arbitrary code.
46 unsafe-load-any-extension=no
47
48
49 [MESSAGES CONTROL]
50
51 # Only show warnings with the listed confidence levels. Leave empty to show
52 # all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED.
53 confidence=
54
55 # Disable the message, report, category or checker with the given id(s). You
56 # can either give multiple identifiers separated by comma (,) or put this
57 # option multiple times (only on the command line, not in the configuration
58 # file where it should appear only once). You can also use "--disable=all" to
59 # disable everything first and then reenable specific checks. For example, if
60 # you want to run only the similarities checker, you can use "--disable=all
61 # --enable=similarities". If you want to run only the classes checker, but have
62 # no Warning level messages displayed, use "--disable=all --enable=classes
63 # --disable=W".
64 disable=bad-continuation,  # Rely on yapf for formatting
65         fixme,
66         subprocess-run-check,
67         raise-missing-from,
68
69 # Enable the message, report, category or checker with the given id(s). You can
70 # either give multiple identifier separated by comma (,) or put this option
71 # multiple time (only on the command line, not in the configuration file where
72 # it should appear only once). See also the "--disable" option for examples.
73 enable=c-extension-no-member,
74
75
76 [REPORTS]
77
78 # Python expression which should return a score less than or equal to 10. You
79 # have access to the variables 'error', 'warning', 'refactor', and 'convention'
80 # which contain the number of messages in each category, as well as 'statement'
81 # which is the total number of statements analyzed. This score is used by the
82 # global evaluation report (RP0004).
83 evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
84
85 # Template used to display messages. This is a python new-style format string
86 # used to format the message information. See doc for all details.
87 #msg-template=
88
89 # Set the output format. Available formats are text, parseable, colorized, json
90 # and msvs (visual studio). You can also give a reporter class, e.g.
91 # mypackage.mymodule.MyReporterClass.
92 output-format=colorized
93
94 # Tells whether to display a full report or only the messages.
95 reports=no
96
97 # Activate the evaluation score.
98 score=no
99
100
101 [REFACTORING]
102
103 # Maximum number of nested blocks for function / method body
104 max-nested-blocks=5
105
106 # Complete name of functions that never returns. When checking for
107 # inconsistent-return-statements if a never returning function is called then
108 # it will be considered as an explicit return statement and no message will be
109 # printed.
110 never-returning-functions=sys.exit
111
112
113 [FORMAT]
114
115 # Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
116 expected-line-ending-format=LF
117
118 # Regexp for a line that is allowed to be longer than the limit.
119 ignore-long-lines=^\s*(# )?<?https?://\S+>?$
120
121 # Number of spaces of indent required inside a hanging or continued line.
122 indent-after-paren=4
123
124 # String used as indentation unit. This is usually "    " (4 spaces) or "\t" (1
125 # tab).
126 indent-string='    '
127
128 # Maximum number of characters on a single line.
129 max-line-length=80
130
131 # Maximum number of lines in a module.
132 max-module-lines=9999
133
134 # List of optional constructs for which whitespace checking is disabled. `dict-
135 # separator` is used to allow tabulation in dicts, etc.: {1  : 1,\n222: 2}.
136 # `trailing-comma` allows a space between comma and closing bracket: (a, ).
137 # `empty-line` allows space-only lines.
138 no-space-check=trailing-comma,
139                dict-separator
140
141 # Allow the body of a class to be on the same line as the declaration if body
142 # contains single statement.
143 single-line-class-stmt=no
144
145 # Allow the body of an if to be on the same line as the test if there is no
146 # else.
147 single-line-if-stmt=no
148
149
150 [VARIABLES]
151
152 # List of additional names supposed to be defined in builtins. Remember that
153 # you should avoid defining new builtins when possible.
154 additional-builtins=
155
156 # Tells whether unused global variables should be treated as a violation.
157 allow-global-unused-variables=yes
158
159 # List of strings which can identify a callback function by name. A callback
160 # name must start or end with one of those strings.
161 callbacks=cb_,
162           _cb
163
164 # A regular expression matching the name of dummy variables (i.e. expected to
165 # not be used).
166 dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
167
168 # Argument names that match this expression will be ignored. Default to name
169 # with leading underscore.
170 ignored-argument-names=_.*|^ignored_|^unused_
171
172 # Tells whether we should check for unused import in __init__ files.
173 init-import=no
174
175 # List of qualified module names which can have objects that can redefine
176 # builtins.
177 redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
178
179
180 [SPELLING]
181
182 # Limits count of emitted suggestions for spelling mistakes.
183 max-spelling-suggestions=4
184
185 # Spelling dictionary name. Available dictionaries: none. To make it work,
186 # install the python-enchant package.
187 spelling-dict=
188
189 # List of comma separated words that should not be checked.
190 spelling-ignore-words=
191
192 # A path to a file that contains the private dictionary; one word per line.
193 spelling-private-dict-file=
194
195 # Tells whether to store unknown words to the private dictionary (see the
196 # --spelling-private-dict-file option) instead of raising a message.
197 spelling-store-unknown-words=no
198
199
200 [LOGGING]
201
202 # Format style used to check logging format string. `old` means using %
203 # formatting, `new` is for `{}` formatting,and `fstr` is for f-strings.
204 logging-format-style=old
205
206 # Logging modules to check that the string format arguments are in logging
207 # function parameter format.
208 logging-modules=logging
209
210
211 [SIMILARITIES]
212
213 # Ignore comments when computing similarities.
214 ignore-comments=yes
215
216 # Ignore docstrings when computing similarities.
217 ignore-docstrings=yes
218
219 # Ignore imports when computing similarities.
220 ignore-imports=no
221
222 # Minimum lines number of a similarity.
223 min-similarity-lines=4
224
225
226 [MISCELLANEOUS]
227
228 # List of note tags to take in consideration, separated by a comma.
229 notes=FIXME,
230       XXX,
231       TODO
232
233
234 [STRING]
235
236 # This flag controls whether the implicit-str-concat-in-sequence should
237 # generate a warning on implicit string concatenation in sequences defined over
238 # several lines.
239 check-str-concat-over-line-jumps=no
240
241
242 [BASIC]
243
244 # Naming style matching correct argument names.
245 argument-naming-style=snake_case
246
247 # Regular expression matching correct argument names. Overrides argument-
248 # naming-style.
249 #argument-rgx=
250
251 # Naming style matching correct attribute names.
252 attr-naming-style=snake_case
253
254 # Regular expression matching correct attribute names. Overrides attr-naming-
255 # style.
256 #attr-rgx=
257
258 # Bad variable names which should always be refused, separated by a comma.
259 bad-names=foo,
260           bar,
261           baz,
262           toto,
263           tutu,
264           tata
265
266 # Naming style matching correct class attribute names.
267 class-attribute-naming-style=any
268
269 # Regular expression matching correct class attribute names. Overrides class-
270 # attribute-naming-style.
271 #class-attribute-rgx=
272
273 # Naming style matching correct class names.
274 class-naming-style=PascalCase
275
276 # Regular expression matching correct class names. Overrides class-naming-
277 # style.
278 #class-rgx=
279
280 # Naming style matching correct constant names.
281 const-naming-style=UPPER_CASE
282
283 # Regular expression matching correct constant names. Overrides const-naming-
284 # style.
285 const-rgx=^(_?[A-Z][A-Z0-9_]*|__[a-z0-9_]+__|_?[a-z][a-z0-9_]*)$
286
287 # Minimum line length for functions/classes that require docstrings, shorter
288 # ones are exempt.
289 docstring-min-length=30
290
291 # Naming style matching correct function names.
292 function-naming-style=snake_case
293
294 # Regular expression matching correct function names. Overrides function-
295 # naming-style.
296 #function-rgx=
297
298 # Good variable names which should always be accepted, separated by a comma.
299 good-names=i,
300            j,
301            k,
302            db,
303            ex,
304            fd,
305            id,
306            ok,
307            Run,
308            T,
309            _
310
311 # Include a hint for the correct naming format with invalid-name.
312 include-naming-hint=no
313
314 # Naming style matching correct inline iteration names.
315 inlinevar-naming-style=any
316
317 # Regular expression matching correct inline iteration names. Overrides
318 # inlinevar-naming-style.
319 #inlinevar-rgx=
320
321 # Naming style matching correct method names.
322 method-naming-style=snake_case
323
324 # Regular expression matching correct method names. Overrides method-naming-
325 # style.
326 #method-rgx=
327
328 # Naming style matching correct module names.
329 module-naming-style=snake_case
330
331 # Regular expression matching correct module names. Overrides module-naming-
332 # style.
333 #module-rgx=
334
335 # Colon-delimited sets of names that determine each other's naming style when
336 # the name regexes allow several styles.
337 name-group=
338
339 # Regular expression which should only match function or class names that do
340 # not require a docstring.
341 no-docstring-rgx=^_
342
343 # List of decorators that produce properties, such as abc.abstractproperty. Add
344 # to this list to register other decorators that produce valid properties.
345 # These decorators are taken in consideration only for invalid-name.
346 property-classes=abc.abstractproperty
347
348 # Naming style matching correct variable names.
349 variable-naming-style=snake_case
350
351 # Regular expression matching correct variable names. Overrides variable-
352 # naming-style.
353 #variable-rgx=
354
355
356 [TYPECHECK]
357
358 # List of decorators that produce context managers, such as
359 # contextlib.contextmanager. Add to this list to register other decorators that
360 # produce valid context managers.
361 contextmanager-decorators=contextlib.contextmanager
362
363 # List of members which are set dynamically and missed by pylint inference
364 # system, and so shouldn't trigger E1101 when accessed. Python regular
365 # expressions are accepted.
366 generated-members=descriptor_pb2.*,plugin_pb2.*
367
368 # Tells whether missing members accessed in mixin class should be ignored. A
369 # mixin class is detected if its name ends with "mixin" (case insensitive).
370 ignore-mixin-members=yes
371
372 # Tells whether to warn about missing members when the owner of the attribute
373 # is inferred to be None.
374 ignore-none=yes
375
376 # This flag controls whether pylint should warn about no-member and similar
377 # checks whenever an opaque object is returned when inferring. The inference
378 # can return multiple potential results while evaluating a Python object, but
379 # some branches might not be evaluated, which results in partial inference. In
380 # that case, it might be useful to still emit no-member and other checks for
381 # the rest of the inferred objects.
382 ignore-on-opaque-inference=yes
383
384 # List of class names for which member attributes should not be checked (useful
385 # for classes with dynamically set attributes). This supports the use of
386 # qualified names.
387 ignored-classes=optparse.Values,
388                 thread._local,
389                 _thread._local,
390                 pw_cli.envparse.EnvNamespace
391
392 # List of module names for which member attributes should not be checked
393 # (useful for modules/projects where namespaces are manipulated during runtime
394 # and thus existing member attributes cannot be deduced by static analysis). It
395 # supports qualified module names, as well as Unix pattern matching.
396 ignored-modules=*_pb2
397
398 # Show a hint with possible names when a member name was not found. The aspect
399 # of finding the hint is based on edit distance.
400 missing-member-hint=yes
401
402 # The minimum edit distance a name should have in order to be considered a
403 # similar match for a missing member name.
404 missing-member-hint-distance=1
405
406 # The total number of similar names that should be taken in consideration when
407 # showing a hint for a missing member.
408 missing-member-max-choices=1
409
410 # List of decorators that change the signature of a decorated function.
411 signature-mutators=
412
413
414 [DESIGN]
415
416 # Maximum number of arguments for function / method.
417 max-args=10
418
419 # Maximum number of attributes for a class (see R0902).
420 max-attributes=11
421
422 # Maximum number of boolean expressions in an if statement (see R0916).
423 max-bool-expr=5
424
425 # Maximum number of branch for function / method body.
426 max-branches=25
427
428 # Maximum number of locals for function / method body.
429 max-locals=25
430
431 # Maximum number of parents for a class (see R0901).
432 max-parents=7
433
434 # Maximum number of public methods for a class (see R0904).
435 max-public-methods=25
436
437 # Maximum number of return / yield for function / method body.
438 max-returns=10
439
440 # Maximum number of statements in function / method body.
441 max-statements=100
442
443 # Minimum number of public methods for a class (see R0903).
444 min-public-methods=0
445
446
447 [CLASSES]
448
449 # List of method names used to declare (i.e. assign) instance attributes.
450 defining-attr-methods=__init__,
451                       __new__,
452                       setUp,
453                       __post_init__
454
455 # List of member names, which should be excluded from the protected access
456 # warning.
457 exclude-protected=_asdict,
458                   _fields,
459                   _replace,
460                   _source,
461                   _make
462
463 # List of valid names for the first argument in a class method.
464 valid-classmethod-first-arg=cls
465
466 # List of valid names for the first argument in a metaclass class method.
467 valid-metaclass-classmethod-first-arg=cls
468
469
470 [IMPORTS]
471
472 # List of modules that can be imported at any level, not just the top level
473 # one.
474 allow-any-import-level=
475
476 # Allow wildcard imports from modules that define __all__.
477 allow-wildcard-with-all=no
478
479 # Analyse import fallback blocks. This can be used to support both Python 2 and
480 # 3 compatible code, which means that the block might have code that exists
481 # only in one or another interpreter, leading to false positives when analysed.
482 analyse-fallback-blocks=no
483
484 # Deprecated modules which should not be used, separated by a comma.
485 deprecated-modules=optparse,tkinter.tix
486
487 # Create a graph of external dependencies in the given file (report RP0402 must
488 # not be disabled).
489 ext-import-graph=
490
491 # Create a graph of every (i.e. internal and external) dependencies in the
492 # given file (report RP0402 must not be disabled).
493 import-graph=
494
495 # Create a graph of internal dependencies in the given file (report RP0402 must
496 # not be disabled).
497 int-import-graph=
498
499 # Force import order to recognize a module as part of the standard
500 # compatibility libraries.
501 known-standard-library=
502
503 # Force import order to recognize a module as part of a third party library.
504 known-third-party=enchant
505
506 # Couples of modules and preferred modules, separated by a comma.
507 preferred-modules=
508
509
510 [EXCEPTIONS]
511
512 # Exceptions that will emit a warning when being caught. Defaults to
513 # "BaseException, Exception".
514 overgeneral-exceptions=BaseException,
515                        Exception