blob: 1d46aeef9cbab780f37f92d816c99fbf45074c23 [file] [log] [blame]
Rob Mohr58254ae2021-05-21 16:08:27 -07001[MASTER] # inclusive-language: ignore
Wyatt Heplerb627b412019-11-27 09:41:25 -08002
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.
Rob Mohr5d6d66c2021-10-07 12:03:20 -07006extension-pkg-allowlist=mypy
Wyatt Heplerb627b412019-11-27 09:41:25 -08007
Rob Mohrc26cb512020-10-12 11:41:54 -07008# Add files or directories to the blocklist. They should be base names, not
Wyatt Heplerb627b412019-11-27 09:41:25 -08009# paths.
10ignore=CVS
11
Rob Mohrc26cb512020-10-12 11:41:54 -070012# Add files or directories matching the regex patterns to the blocklist. The
Wyatt Heplerb627b412019-11-27 09:41:25 -080013# regex matches against base names, not paths.
14ignore-patterns=
15
16# Python code to execute, usually for sys.path manipulation such as
17# pygtk.require().
18#init-hook=
19
20# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
21# number of processors available to use.
22jobs=0
23
24# Control the amount of potential inferred values when inferring a single
25# object. This can help the performance when dealing with large functions or
26# complex, nested conditions.
27limit-inference-results=100
28
29# List of plugins (as comma separated values of python module names) to load,
30# usually to register additional checkers.
31load-plugins=
32
33# Pickle collected data for later comparisons.
34persistent=yes
35
36# Specify a configuration file.
37#rcfile=
38
39# When enabled, pylint would attempt to guess common misconfiguration and emit
40# user-friendly hints instead of false-positive error messages.
41suggestion-mode=yes
42
43# Allow loading of arbitrary C extensions. Extensions are imported into the
44# active Python interpreter and may run arbitrary code.
45unsafe-load-any-extension=no
46
47
48[MESSAGES CONTROL]
49
50# Only show warnings with the listed confidence levels. Leave empty to show
51# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED.
52confidence=
53
54# Disable the message, report, category or checker with the given id(s). You
55# can either give multiple identifiers separated by comma (,) or put this
56# option multiple times (only on the command line, not in the configuration
57# file where it should appear only once). You can also use "--disable=all" to
58# disable everything first and then reenable specific checks. For example, if
59# you want to run only the similarities checker, you can use "--disable=all
60# --enable=similarities". If you want to run only the classes checker, but have
61# no Warning level messages displayed, use "--disable=all --enable=classes
62# --disable=W".
Wyatt Heplerb16dfd32020-10-12 08:46:38 -070063disable=bad-continuation, # Rely on yapf for formatting
Wyatt Heplera352d572021-07-12 08:59:41 -070064 consider-using-with,
Wyatt Heplerb16dfd32020-10-12 08:46:38 -070065 fixme,
Wyatt Hepler2e3619d2020-10-29 12:52:52 -070066 subprocess-run-check,
67 raise-missing-from,
Wyatt Heplerb627b412019-11-27 09:41:25 -080068
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.
Wyatt Hepler2e3619d2020-10-29 12:52:52 -070073enable=c-extension-no-member,
Wyatt Heplerb627b412019-11-27 09:41:25 -080074
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).
83evaluation=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.
Wyatt Hepler2e3619d2020-10-29 12:52:52 -070092output-format=colorized
Wyatt Heplerb627b412019-11-27 09:41:25 -080093
94# Tells whether to display a full report or only the messages.
95reports=no
96
97# Activate the evaluation score.
98score=no
99
100
101[REFACTORING]
102
103# Maximum number of nested blocks for function / method body
104max-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.
110never-returning-functions=sys.exit
111
112
113[FORMAT]
114
115# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
116expected-line-ending-format=LF
117
118# Regexp for a line that is allowed to be longer than the limit.
119ignore-long-lines=^\s*(# )?<?https?://\S+>?$
120
121# Number of spaces of indent required inside a hanging or continued line.
122indent-after-paren=4
123
124# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
125# tab).
126indent-string=' '
127
128# Maximum number of characters on a single line.
129max-line-length=80
130
131# Maximum number of lines in a module.
132max-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.
138no-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.
143single-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.
147single-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.
154additional-builtins=
155
156# Tells whether unused global variables should be treated as a violation.
157allow-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.
161callbacks=cb_,
162 _cb
163
Rob Mohr58254ae2021-05-21 16:08:27 -0700164# A regular expression matching the name of placeholder variables (i.e.
165# expected to not be used). # inclusive-language: ignore
Wyatt Heplerb627b412019-11-27 09:41:25 -0800166dummy-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.
170ignored-argument-names=_.*|^ignored_|^unused_
171
172# Tells whether we should check for unused import in __init__ files.
173init-import=no
174
175# List of qualified module names which can have objects that can redefine
176# builtins.
177redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
178
179
180[SPELLING]
181
182# Limits count of emitted suggestions for spelling mistakes.
183max-spelling-suggestions=4
184
185# Spelling dictionary name. Available dictionaries: none. To make it work,
186# install the python-enchant package.
187spelling-dict=
188
189# List of comma separated words that should not be checked.
190spelling-ignore-words=
191
192# A path to a file that contains the private dictionary; one word per line.
193spelling-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.
197spelling-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.
204logging-format-style=old
205
206# Logging modules to check that the string format arguments are in logging
207# function parameter format.
208logging-modules=logging
209
210
211[SIMILARITIES]
212
213# Ignore comments when computing similarities.
214ignore-comments=yes
215
216# Ignore docstrings when computing similarities.
217ignore-docstrings=yes
218
219# Ignore imports when computing similarities.
220ignore-imports=no
221
222# Minimum lines number of a similarity.
223min-similarity-lines=4
224
225
226[MISCELLANEOUS]
227
228# List of note tags to take in consideration, separated by a comma.
229notes=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.
239check-str-concat-over-line-jumps=no
240
241
242[BASIC]
243
244# Naming style matching correct argument names.
245argument-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.
252attr-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.
259bad-names=foo,
260 bar,
261 baz,
262 toto,
263 tutu,
264 tata
265
266# Naming style matching correct class attribute names.
267class-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.
274class-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.
281const-naming-style=UPPER_CASE
282
283# Regular expression matching correct constant names. Overrides const-naming-
284# style.
Wyatt Hepler8635af92019-12-05 16:32:44 -0800285const-rgx=^(_?[A-Z][A-Z0-9_]*|__[a-z0-9_]+__|_?[a-z][a-z0-9_]*)$
Wyatt Heplerb627b412019-11-27 09:41:25 -0800286
287# Minimum line length for functions/classes that require docstrings, shorter
288# ones are exempt.
289docstring-min-length=30
290
291# Naming style matching correct function names.
292function-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.
299good-names=i,
300 j,
301 k,
Wyatt Heplerbc254972020-01-06 18:35:30 -0800302 db,
Wyatt Heplerb627b412019-11-27 09:41:25 -0800303 ex,
304 fd,
Wyatt Hepler5cfde332020-06-30 08:53:44 -0700305 id,
Wyatt Heplerbc254972020-01-06 18:35:30 -0800306 ok,
Wyatt Heplerb627b412019-11-27 09:41:25 -0800307 Run,
Alexei Frolov77e7a612019-12-27 13:41:31 -0800308 T,
Wyatt Heplerb627b412019-11-27 09:41:25 -0800309 _
310
311# Include a hint for the correct naming format with invalid-name.
312include-naming-hint=no
313
314# Naming style matching correct inline iteration names.
315inlinevar-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.
322method-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.
329module-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.
337name-group=
338
339# Regular expression which should only match function or class names that do
340# not require a docstring.
341no-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.
346property-classes=abc.abstractproperty
347
348# Naming style matching correct variable names.
349variable-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.
361contextmanager-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.
Alexei Frolovbbf164c2019-12-16 12:51:59 -0800366generated-members=descriptor_pb2.*,plugin_pb2.*
Wyatt Heplerb627b412019-11-27 09:41:25 -0800367
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).
370ignore-mixin-members=yes
371
372# Tells whether to warn about missing members when the owner of the attribute
373# is inferred to be None.
374ignore-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.
382ignore-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.
Alexei Frolov7b8528e2020-01-03 10:02:26 -0800387ignored-classes=optparse.Values,
388 thread._local,
389 _thread._local,
Alexei Frolov38cad0c2020-12-03 12:36:24 -0800390 pw_cli.envparse.EnvNamespace
Wyatt Heplerb627b412019-11-27 09:41:25 -0800391
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.
Alexei Frolov38cad0c2020-12-03 12:36:24 -0800396ignored-modules=*_pb2
Wyatt Heplerb627b412019-11-27 09:41:25 -0800397
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.
400missing-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.
404missing-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.
408missing-member-max-choices=1
409
410# List of decorators that change the signature of a decorated function.
411signature-mutators=
412
413
414[DESIGN]
415
416# Maximum number of arguments for function / method.
417max-args=10
418
419# Maximum number of attributes for a class (see R0902).
420max-attributes=11
421
422# Maximum number of boolean expressions in an if statement (see R0916).
423max-bool-expr=5
424
425# Maximum number of branch for function / method body.
426max-branches=25
427
428# Maximum number of locals for function / method body.
429max-locals=25
430
431# Maximum number of parents for a class (see R0901).
432max-parents=7
433
434# Maximum number of public methods for a class (see R0904).
435max-public-methods=25
436
437# Maximum number of return / yield for function / method body.
438max-returns=10
439
440# Maximum number of statements in function / method body.
441max-statements=100
442
443# Minimum number of public methods for a class (see R0903).
Wyatt Hepler5cfde332020-06-30 08:53:44 -0700444min-public-methods=0
Wyatt Heplerb627b412019-11-27 09:41:25 -0800445
446
447[CLASSES]
448
449# List of method names used to declare (i.e. assign) instance attributes.
450defining-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.
457exclude-protected=_asdict,
458 _fields,
459 _replace,
460 _source,
461 _make
462
463# List of valid names for the first argument in a class method.
464valid-classmethod-first-arg=cls
465
466# List of valid names for the first argument in a metaclass class method.
467valid-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.
474allow-any-import-level=
475
476# Allow wildcard imports from modules that define __all__.
477allow-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.
482analyse-fallback-blocks=no
483
484# Deprecated modules which should not be used, separated by a comma.
485deprecated-modules=optparse,tkinter.tix
486
487# Create a graph of external dependencies in the given file (report RP0402 must
488# not be disabled).
489ext-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).
493import-graph=
494
495# Create a graph of internal dependencies in the given file (report RP0402 must
496# not be disabled).
497int-import-graph=
498
499# Force import order to recognize a module as part of the standard
500# compatibility libraries.
501known-standard-library=
502
503# Force import order to recognize a module as part of a third party library.
504known-third-party=enchant
505
506# Couples of modules and preferred modules, separated by a comma.
507preferred-modules=
508
509
510[EXCEPTIONS]
511
512# Exceptions that will emit a warning when being caught. Defaults to
513# "BaseException, Exception".
514overgeneral-exceptions=BaseException,
515 Exception