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
6 # TODO(pwbug/280) Change "whitelist" to "allowlist". (Blocked on pylint.)
7 extension-pkg-whitelist=mypy
9 # Add files or directories to the blocklist. They should be base names, not
13 # Add files or directories matching the regex patterns to the blocklist. The
14 # regex matches against base names, not paths.
17 # Python code to execute, usually for sys.path manipulation such as
21 # Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
22 # number of processors available to use.
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
30 # List of plugins (as comma separated values of python module names) to load,
31 # usually to register additional checkers.
34 # Pickle collected data for later comparisons.
37 # Specify a configuration file.
40 # When enabled, pylint would attempt to guess common misconfiguration and emit
41 # user-friendly hints instead of false-positive error messages.
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
51 # Only show warnings with the listed confidence levels. Leave empty to show
52 # all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED.
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
64 disable=bad-continuation, # Rely on yapf for formatting
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,
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)
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.
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
94 # Tells whether to display a full report or only the messages.
97 # Activate the evaluation score.
103 # Maximum number of nested blocks for function / method body
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
110 never-returning-functions=sys.exit
115 # Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
116 expected-line-ending-format=LF
118 # Regexp for a line that is allowed to be longer than the limit.
119 ignore-long-lines=^\s*(# )?<?https?://\S+>?$
121 # Number of spaces of indent required inside a hanging or continued line.
124 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
128 # Maximum number of characters on a single line.
131 # Maximum number of lines in a module.
132 max-module-lines=9999
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,
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
145 # Allow the body of an if to be on the same line as the test if there is no
147 single-line-if-stmt=no
152 # List of additional names supposed to be defined in builtins. Remember that
153 # you should avoid defining new builtins when possible.
156 # Tells whether unused global variables should be treated as a violation.
157 allow-global-unused-variables=yes
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.
164 # A regular expression matching the name of dummy variables (i.e. expected to
166 dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
168 # Argument names that match this expression will be ignored. Default to name
169 # with leading underscore.
170 ignored-argument-names=_.*|^ignored_|^unused_
172 # Tells whether we should check for unused import in __init__ files.
175 # List of qualified module names which can have objects that can redefine
177 redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
182 # Limits count of emitted suggestions for spelling mistakes.
183 max-spelling-suggestions=4
185 # Spelling dictionary name. Available dictionaries: none. To make it work,
186 # install the python-enchant package.
189 # List of comma separated words that should not be checked.
190 spelling-ignore-words=
192 # A path to a file that contains the private dictionary; one word per line.
193 spelling-private-dict-file=
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
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
206 # Logging modules to check that the string format arguments are in logging
207 # function parameter format.
208 logging-modules=logging
213 # Ignore comments when computing similarities.
216 # Ignore docstrings when computing similarities.
217 ignore-docstrings=yes
219 # Ignore imports when computing similarities.
222 # Minimum lines number of a similarity.
223 min-similarity-lines=4
228 # List of note tags to take in consideration, separated by a comma.
236 # This flag controls whether the implicit-str-concat-in-sequence should
237 # generate a warning on implicit string concatenation in sequences defined over
239 check-str-concat-over-line-jumps=no
244 # Naming style matching correct argument names.
245 argument-naming-style=snake_case
247 # Regular expression matching correct argument names. Overrides argument-
251 # Naming style matching correct attribute names.
252 attr-naming-style=snake_case
254 # Regular expression matching correct attribute names. Overrides attr-naming-
258 # Bad variable names which should always be refused, separated by a comma.
266 # Naming style matching correct class attribute names.
267 class-attribute-naming-style=any
269 # Regular expression matching correct class attribute names. Overrides class-
270 # attribute-naming-style.
271 #class-attribute-rgx=
273 # Naming style matching correct class names.
274 class-naming-style=PascalCase
276 # Regular expression matching correct class names. Overrides class-naming-
280 # Naming style matching correct constant names.
281 const-naming-style=UPPER_CASE
283 # Regular expression matching correct constant names. Overrides const-naming-
285 const-rgx=^(_?[A-Z][A-Z0-9_]*|__[a-z0-9_]+__|_?[a-z][a-z0-9_]*)$
287 # Minimum line length for functions/classes that require docstrings, shorter
289 docstring-min-length=30
291 # Naming style matching correct function names.
292 function-naming-style=snake_case
294 # Regular expression matching correct function names. Overrides function-
298 # Good variable names which should always be accepted, separated by a comma.
311 # Include a hint for the correct naming format with invalid-name.
312 include-naming-hint=no
314 # Naming style matching correct inline iteration names.
315 inlinevar-naming-style=any
317 # Regular expression matching correct inline iteration names. Overrides
318 # inlinevar-naming-style.
321 # Naming style matching correct method names.
322 method-naming-style=snake_case
324 # Regular expression matching correct method names. Overrides method-naming-
328 # Naming style matching correct module names.
329 module-naming-style=snake_case
331 # Regular expression matching correct module names. Overrides module-naming-
335 # Colon-delimited sets of names that determine each other's naming style when
336 # the name regexes allow several styles.
339 # Regular expression which should only match function or class names that do
340 # not require a docstring.
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
348 # Naming style matching correct variable names.
349 variable-naming-style=snake_case
351 # Regular expression matching correct variable names. Overrides variable-
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
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.*
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
372 # Tells whether to warn about missing members when the owner of the attribute
373 # is inferred to be None.
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
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
387 ignored-classes=optparse.Values,
390 pw_cli.envparse.EnvNamespace
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
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
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
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
410 # List of decorators that change the signature of a decorated function.
416 # Maximum number of arguments for function / method.
419 # Maximum number of attributes for a class (see R0902).
422 # Maximum number of boolean expressions in an if statement (see R0916).
425 # Maximum number of branch for function / method body.
428 # Maximum number of locals for function / method body.
431 # Maximum number of parents for a class (see R0901).
434 # Maximum number of public methods for a class (see R0904).
435 max-public-methods=25
437 # Maximum number of return / yield for function / method body.
440 # Maximum number of statements in function / method body.
443 # Minimum number of public methods for a class (see R0903).
449 # List of method names used to declare (i.e. assign) instance attributes.
450 defining-attr-methods=__init__,
455 # List of member names, which should be excluded from the protected access
457 exclude-protected=_asdict,
463 # List of valid names for the first argument in a class method.
464 valid-classmethod-first-arg=cls
466 # List of valid names for the first argument in a metaclass class method.
467 valid-metaclass-classmethod-first-arg=cls
472 # List of modules that can be imported at any level, not just the top level
474 allow-any-import-level=
476 # Allow wildcard imports from modules that define __all__.
477 allow-wildcard-with-all=no
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
484 # Deprecated modules which should not be used, separated by a comma.
485 deprecated-modules=optparse,tkinter.tix
487 # Create a graph of external dependencies in the given file (report RP0402 must
491 # Create a graph of every (i.e. internal and external) dependencies in the
492 # given file (report RP0402 must not be disabled).
495 # Create a graph of internal dependencies in the given file (report RP0402 must
499 # Force import order to recognize a module as part of the standard
500 # compatibility libraries.
501 known-standard-library=
503 # Force import order to recognize a module as part of a third party library.
504 known-third-party=enchant
506 # Couples of modules and preferred modules, separated by a comma.
512 # Exceptions that will emit a warning when being caught. Defaults to
513 # "BaseException, Exception".
514 overgeneral-exceptions=BaseException,