/ .pylintrc
.pylintrc
  1  # SPDX-FileCopyrightText: 2019 ladyada for Adafruit Industries
  2  #
  3  # SPDX-License-Identifier: Unlicense
  4  
  5  [MASTER]
  6  
  7  # A comma-separated list of package or module names from where C extensions may
  8  # be loaded. Extensions are loading into the active Python interpreter and may
  9  # run arbitrary code
 10  extension-pkg-whitelist=
 11  
 12  # Add files or directories to the blacklist. They should be base names, not
 13  # paths.
 14  ignore=CVS
 15  
 16  # Add files or directories matching the regex patterns to the blacklist. The
 17  # regex matches against base names, not paths.
 18  ignore-patterns=
 19  
 20  # Python code to execute, usually for sys.path manipulation such as
 21  # pygtk.require().
 22  #init-hook=
 23  
 24  # Use multiple processes to speed up Pylint.
 25  # jobs=1
 26  jobs=2
 27  
 28  # List of plugins (as comma separated values of python modules names) to load,
 29  # usually to register additional checkers.
 30  load-plugins=
 31  
 32  # Pickle collected data for later comparisons.
 33  persistent=yes
 34  
 35  # Specify a configuration file.
 36  #rcfile=
 37  
 38  # Allow loading of arbitrary C extensions. Extensions are imported into the
 39  # active Python interpreter and may run arbitrary code.
 40  unsafe-load-any-extension=no
 41  
 42  
 43  [MESSAGES CONTROL]
 44  
 45  # Only show warnings with the listed confidence levels. Leave empty to show
 46  # all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
 47  confidence=
 48  
 49  # Disable the message, report, category or checker with the given id(s). You
 50  # can either give multiple identifiers separated by comma (,) or put this
 51  # option multiple times (only on the command line, not in the configuration
 52  # file where it should appear only once).You can also use "--disable=all" to
 53  # disable everything first and then reenable specific checks. For example, if
 54  # you want to run only the similarities checker, you can use "--disable=all
 55  # --enable=similarities". If you want to run only the classes checker, but have
 56  # no Warning level messages displayed, use"--disable=all --enable=classes
 57  # --disable=W"
 58  # disable=import-error,print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call
 59  disable=print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call,import-error,bad-continuation
 60  
 61  # Enable the message, report, category or checker with the given id(s). You can
 62  # either give multiple identifier separated by comma (,) or put this option
 63  # multiple time (only on the command line, not in the configuration file where
 64  # it should appear only once). See also the "--disable" option for examples.
 65  enable=
 66  
 67  
 68  [REPORTS]
 69  
 70  # Python expression which should return a note less than 10 (10 is the highest
 71  # note). You have access to the variables errors warning, statement which
 72  # respectively contain the number of errors / warnings messages and the total
 73  # number of statements analyzed. This is used by the global evaluation report
 74  # (RP0004).
 75  evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
 76  
 77  # Template used to display messages. This is a python new-style format string
 78  # used to format the message information. See doc for all details
 79  #msg-template=
 80  
 81  # Set the output format. Available formats are text, parseable, colorized, json
 82  # and msvs (visual studio).You can also give a reporter class, eg
 83  # mypackage.mymodule.MyReporterClass.
 84  output-format=text
 85  
 86  # Tells whether to display a full report or only the messages
 87  reports=no
 88  
 89  # Activate the evaluation score.
 90  score=yes
 91  
 92  
 93  [REFACTORING]
 94  
 95  # Maximum number of nested blocks for function / method body
 96  max-nested-blocks=5
 97  
 98  
 99  [LOGGING]
100  
101  # Logging modules to check that the string format arguments are in logging
102  # function parameter format
103  logging-modules=logging
104  
105  
106  [SPELLING]
107  
108  # Spelling dictionary name. Available dictionaries: none. To make it working
109  # install python-enchant package.
110  spelling-dict=
111  
112  # List of comma separated words that should not be checked.
113  spelling-ignore-words=
114  
115  # A path to a file that contains private dictionary; one word per line.
116  spelling-private-dict-file=
117  
118  # Tells whether to store unknown words to indicated private dictionary in
119  # --spelling-private-dict-file option instead of raising a message.
120  spelling-store-unknown-words=no
121  
122  
123  [MISCELLANEOUS]
124  
125  # List of note tags to take in consideration, separated by a comma.
126  # notes=FIXME,XXX,TODO
127  notes=FIXME,XXX
128  
129  
130  [TYPECHECK]
131  
132  # List of decorators that produce context managers, such as
133  # contextlib.contextmanager. Add to this list to register other decorators that
134  # produce valid context managers.
135  contextmanager-decorators=contextlib.contextmanager
136  
137  # List of members which are set dynamically and missed by pylint inference
138  # system, and so shouldn't trigger E1101 when accessed. Python regular
139  # expressions are accepted.
140  generated-members=
141  
142  # Tells whether missing members accessed in mixin class should be ignored. A
143  # mixin class is detected if its name ends with "mixin" (case insensitive).
144  ignore-mixin-members=yes
145  
146  # This flag controls whether pylint should warn about no-member and similar
147  # checks whenever an opaque object is returned when inferring. The inference
148  # can return multiple potential results while evaluating a Python object, but
149  # some branches might not be evaluated, which results in partial inference. In
150  # that case, it might be useful to still emit no-member and other checks for
151  # the rest of the inferred objects.
152  ignore-on-opaque-inference=yes
153  
154  # List of class names for which member attributes should not be checked (useful
155  # for classes with dynamically set attributes). This supports the use of
156  # qualified names.
157  ignored-classes=optparse.Values,thread._local,_thread._local
158  
159  # List of module names for which member attributes should not be checked
160  # (useful for modules/projects where namespaces are manipulated during runtime
161  # and thus existing member attributes cannot be deduced by static analysis. It
162  # supports qualified module names, as well as Unix pattern matching.
163  ignored-modules=board
164  
165  # Show a hint with possible names when a member name was not found. The aspect
166  # of finding the hint is based on edit distance.
167  missing-member-hint=yes
168  
169  # The minimum edit distance a name should have in order to be considered a
170  # similar match for a missing member name.
171  missing-member-hint-distance=1
172  
173  # The total number of similar names that should be taken in consideration when
174  # showing a hint for a missing member.
175  missing-member-max-choices=1
176  
177  
178  [VARIABLES]
179  
180  # List of additional names supposed to be defined in builtins. Remember that
181  # you should avoid to define new builtins when possible.
182  additional-builtins=
183  
184  # Tells whether unused global variables should be treated as a violation.
185  allow-global-unused-variables=yes
186  
187  # List of strings which can identify a callback function by name. A callback
188  # name must start or end with one of those strings.
189  callbacks=cb_,_cb
190  
191  # A regular expression matching the name of dummy variables (i.e. expectedly
192  # not used).
193  dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
194  
195  # Argument names that match this expression will be ignored. Default to name
196  # with leading underscore
197  ignored-argument-names=_.*|^ignored_|^unused_
198  
199  # Tells whether we should check for unused import in __init__ files.
200  init-import=no
201  
202  # List of qualified module names which can have objects that can redefine
203  # builtins.
204  redefining-builtins-modules=six.moves,future.builtins
205  
206  
207  [FORMAT]
208  
209  # Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
210  # expected-line-ending-format=
211  expected-line-ending-format=LF
212  
213  # Regexp for a line that is allowed to be longer than the limit.
214  ignore-long-lines=^\s*(# )?<?https?://\S+>?$
215  
216  # Number of spaces of indent required inside a hanging  or continued line.
217  indent-after-paren=4
218  
219  # String used as indentation unit. This is usually "    " (4 spaces) or "\t" (1
220  # tab).
221  indent-string='    '
222  
223  # Maximum number of characters on a single line.
224  max-line-length=100
225  
226  # Maximum number of lines in a module
227  max-module-lines=1000
228  
229  # List of optional constructs for which whitespace checking is disabled. `dict-
230  # separator` is used to allow tabulation in dicts, etc.: {1  : 1,\n222: 2}.
231  # `trailing-comma` allows a space between comma and closing bracket: (a, ).
232  # `empty-line` allows space-only lines.
233  no-space-check=trailing-comma,dict-separator
234  
235  # Allow the body of a class to be on the same line as the declaration if body
236  # contains single statement.
237  single-line-class-stmt=no
238  
239  # Allow the body of an if to be on the same line as the test if there is no
240  # else.
241  single-line-if-stmt=no
242  
243  
244  [SIMILARITIES]
245  
246  # Ignore comments when computing similarities.
247  ignore-comments=yes
248  
249  # Ignore docstrings when computing similarities.
250  ignore-docstrings=yes
251  
252  # Ignore imports when computing similarities.
253  ignore-imports=no
254  
255  # Minimum lines number of a similarity.
256  min-similarity-lines=4
257  
258  
259  [BASIC]
260  
261  # Naming hint for argument names
262  argument-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
263  
264  # Regular expression matching correct argument names
265  argument-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
266  
267  # Naming hint for attribute names
268  attr-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
269  
270  # Regular expression matching correct attribute names
271  attr-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
272  
273  # Bad variable names which should always be refused, separated by a comma
274  bad-names=foo,bar,baz,toto,tutu,tata
275  
276  # Naming hint for class attribute names
277  class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
278  
279  # Regular expression matching correct class attribute names
280  class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
281  
282  # Naming hint for class names
283  # class-name-hint=[A-Z_][a-zA-Z0-9]+$
284  class-name-hint=[A-Z_][a-zA-Z0-9_]+$
285  
286  # Regular expression matching correct class names
287  # class-rgx=[A-Z_][a-zA-Z0-9]+$
288  class-rgx=[A-Z_][a-zA-Z0-9_]+$
289  
290  # Naming hint for constant names
291  const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
292  
293  # Regular expression matching correct constant names
294  const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
295  
296  # Minimum line length for functions/classes that require docstrings, shorter
297  # ones are exempt.
298  docstring-min-length=-1
299  
300  # Naming hint for function names
301  function-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
302  
303  # Regular expression matching correct function names
304  function-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
305  
306  # Good variable names which should always be accepted, separated by a comma
307  # good-names=i,j,k,ex,Run,_
308  good-names=r,g,b,w,i,j,k,n,x,y,z,ex,ok,Run,_
309  
310  # Include a hint for the correct naming format with invalid-name
311  include-naming-hint=no
312  
313  # Naming hint for inline iteration names
314  inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
315  
316  # Regular expression matching correct inline iteration names
317  inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
318  
319  # Naming hint for method names
320  method-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
321  
322  # Regular expression matching correct method names
323  method-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
324  
325  # Naming hint for module names
326  module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
327  
328  # Regular expression matching correct module names
329  module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
330  
331  # Colon-delimited sets of names that determine each other's naming style when
332  # the name regexes allow several styles.
333  name-group=
334  
335  # Regular expression which should only match function or class names that do
336  # not require a docstring.
337  no-docstring-rgx=^_
338  
339  # List of decorators that produce properties, such as abc.abstractproperty. Add
340  # to this list to register other decorators that produce valid properties.
341  property-classes=abc.abstractproperty
342  
343  # Naming hint for variable names
344  variable-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
345  
346  # Regular expression matching correct variable names
347  variable-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
348  
349  
350  [IMPORTS]
351  
352  # Allow wildcard imports from modules that define __all__.
353  allow-wildcard-with-all=no
354  
355  # Analyse import fallback blocks. This can be used to support both Python 2 and
356  # 3 compatible code, which means that the block might have code that exists
357  # only in one or another interpreter, leading to false positives when analysed.
358  analyse-fallback-blocks=no
359  
360  # Deprecated modules which should not be used, separated by a comma
361  deprecated-modules=optparse,tkinter.tix
362  
363  # Create a graph of external dependencies in the given file (report RP0402 must
364  # not be disabled)
365  ext-import-graph=
366  
367  # Create a graph of every (i.e. internal and external) dependencies in the
368  # given file (report RP0402 must not be disabled)
369  import-graph=
370  
371  # Create a graph of internal dependencies in the given file (report RP0402 must
372  # not be disabled)
373  int-import-graph=
374  
375  # Force import order to recognize a module as part of the standard
376  # compatibility libraries.
377  known-standard-library=
378  
379  # Force import order to recognize a module as part of a third party library.
380  known-third-party=enchant
381  
382  
383  [CLASSES]
384  
385  # List of method names used to declare (i.e. assign) instance attributes.
386  defining-attr-methods=__init__,__new__,setUp
387  
388  # List of member names, which should be excluded from the protected access
389  # warning.
390  exclude-protected=_asdict,_fields,_replace,_source,_make
391  
392  # List of valid names for the first argument in a class method.
393  valid-classmethod-first-arg=cls
394  
395  # List of valid names for the first argument in a metaclass class method.
396  valid-metaclass-classmethod-first-arg=mcs
397  
398  
399  [DESIGN]
400  
401  # Maximum number of arguments for function / method
402  max-args=5
403  
404  # Maximum number of attributes for a class (see R0902).
405  # max-attributes=7
406  max-attributes=11
407  
408  # Maximum number of boolean expressions in a if statement
409  max-bool-expr=5
410  
411  # Maximum number of branch for function / method body
412  max-branches=12
413  
414  # Maximum number of locals for function / method body
415  max-locals=15
416  
417  # Maximum number of parents for a class (see R0901).
418  max-parents=7
419  
420  # Maximum number of public methods for a class (see R0904).
421  max-public-methods=20
422  
423  # Maximum number of return / yield for function / method body
424  max-returns=6
425  
426  # Maximum number of statements in function / method body
427  max-statements=50
428  
429  # Minimum number of public methods for a class (see R0903).
430  min-public-methods=1
431  
432  
433  [EXCEPTIONS]
434  
435  # Exceptions that will emit a warning when being caught. Defaults to
436  # "Exception"
437  overgeneral-exceptions=Exception