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