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