Debian Codegraph @

.pylintrc

raw
1 [MASTER]
2
3 # Specify a configuration file.
4 #rcfile=
5
6 # Python code to execute, usually for sys.path manipulation such as
7 # pygtk.require().
8 #init-hook=
9
10 # Profiled execution.
11 profile=no
12
13 # Add files or directories to the blacklist. They should be base names, not
14 # paths.
15 ignore=CVS,_version.py
16
17 # Pickle collected data for later comparisons.
18 persistent=yes
19
20 # List of plugins (as comma separated values of python modules names) to load,
21 # usually to register additional checkers.
22 load-plugins=saltpylint.pep8,
23 saltpylint.strings,
24 saltpylint.fileperms,
25 saltpylint.smartup,
26
27 # Use multiple processes to speed up Pylint.
28 jobs=1
29
30 # Allow loading of arbitrary C extensions. Extensions are imported into the
31 # active Python interpreter and may run arbitrary code.
32 unsafe-load-any-extension=no
33
34 # A comma-separated list of package or module names from where C extensions may
35 # be loaded. Extensions are loading into the active Python interpreter and may
36 # run arbitrary code
37 extension-pkg-whitelist=
38
39 # Fileperms Lint Plugin Settings
40 fileperms-default=0644
41 fileperms-ignore-paths=setup.py
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 # Enable the message, report, category or checker with the given id(s). You can
50 # either give multiple identifier separated by comma (,) or put this option
51 # multiple time. See also the "--disable" option for examples.
52 #enable=
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"
63 #disable=
64 disable=R,
65 I0011,
66 I0012,
67 I0013,
68 E1101,
69 E1103,
70 C0102,
71 C0103,
72 C0111,
73 C0203,
74 C0204,
75 C0301,
76 C0302,
77 C0330,
78 W0110,
79 W0122,
80 W0142,
81 W0201,
82 W0212,
83 W0404,
84 W0511,
85 W0603,
86 W0612,
87 W0613,
88 W0621,
89 W0622,
90 W0631,
91 W0704,
92 W1202,
93 W1307,
94 F0220,
95 F0401,
96 E8501,
97 E8116,
98 E8121,
99 E8122,
100 E8123,
101 E8124,
102 E8125,
103 E8126,
104 E8127,
105 E8128,
106 E8129,
107 E8131,
108 E8265,
109 E8266,
110 E8402,
111 E8731,
112 locally-disabled,
113 repr-flag-used-in-string,
114 un-indexed-curly-braces-error,
115 un-indexed-curly-braces-warning,
116 import-outside-toplevel,
117 wrong-import-position,
118 wrong-import-order,
119 missing-whitespace-after-comma
120
121 # Disabled:
122 # R* [refactoring suggestions & reports]
123 # I0011 (locally-disabling)
124 # I0012 (locally-enabling)
125 # I0013 (file-ignored)
126 # E1101 (no-member) [pylint isn't smart enough]
127 # E1103 (maybe-no-member)
128 # C0102 (blacklisted-name) [because it activates C0103 too]
129 # C0103 (invalid-name)
130 # C0111 (missing-docstring)
131 # C0203 (bad-mcs-method-argument)
132 # C0204 (bad-mcs-classmethod-argument)
133 # C0301 (line-too-long)
134 # C0302 (too-many-lines)
135 # C0330 (bad-continuation)
136 # W0110 (deprecated-lambda)
137 # W0122 (exec-statement)
138 # W0142 (star-args)
139 # W0201 (attribute-defined-outside-init) [done in several places in the codebase]
140 # W0212 (protected-access)
141 # W0404 (reimported) [done intentionally for legit reasons]
142 # W0511 (fixme) [several outstanding instances currently in the codebase]
143 # W0603 (global-statement)
144 # W0612 (unused-variable) [unused return values]
145 # W0613 (unused-argument)
146 # W0621 (redefined-outer-name)
147 # W0622 (redefined-builtin) [many parameter names shadow builtins]
148 # W0631 (undefined-loop-variable) [~3 instances, seem to be okay]
149 # W0704 (pointless-except) [misnomer; "ignores the exception" rather than "pointless"]
150 # F0220 (unresolved-interface)
151 # F0401 (import-error)
152 # W1202 (logging-format-interpolation) Use % formatting in logging functions but pass the % parameters as arguments
153 # W1307 (invalid-format-index) Using invalid lookup key '%s' in format specifier "0['%s']"
154 #
155 # E8116 PEP8 E116: unexpected indentation (comment)
156 # E812* All PEP8 E12*
157 # E8265 PEP8 E265 - block comment should start with "# "
158 # E8266 PEP8 E266 - too many leading '#' for block comment
159 # E8501 PEP8 line too long
160 # E8402 module level import not at top of file
161 # E8731 do not assign a lambda expression, use a def
162 #
163 # E1322(repr-flag-used-in-string)
164
165 [REPORTS]
166
167 # Set the output format. Available formats are text, parseable, colorized, msvs
168 # (visual studio) and html. You can also give a reporter class, eg
169 # mypackage.mymodule.MyReporterClass.
170 output-format=text
171
172 # Put messages in a separate file for each module / package specified on the
173 # command line instead of printing them on stdout. Reports (if any) will be
174 # written in a file name "pylint_global.[txt|html]".
175 files-output=no
176
177 # Tells whether to display a full report or only the messages
178 reports=no
179
180 # Python expression which should return a note less than 10 (10 is the highest
181 # note). You have access to the variables errors warning, statement which
182 # respectively contain the number of errors / warnings messages and the total
183 # number of statements analyzed. This is used by the global evaluation report
184 # (RP0004).
185 evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
186
187 # Add a comment according to your evaluation note. This is used by the global
188 # evaluation report (RP0004).
189 comment=no
190
191 # Template used to display messages. This is a python new-style format string
192 # used to format the message information. See doc for all details
193 #msg-template=
194
195
196 [LOGGING]
197
198 # Logging modules to check that the string format arguments are in logging
199 # function parameter format
200 logging-modules=logging
201
202
203 [SPELLING]
204
205 # Spelling dictionary name. Available dictionaries: none. To make it working
206 # install python-enchant package.
207 spelling-dict=en_US
208
209 # List of comma separated words that should not be checked.
210 spelling-ignore-words=
211
212 # A path to a file that contains private dictionary; one word per line.
213 spelling-private-dict-file=.pylint-spelling-words
214
215 # Tells whether to store unknown words to indicated private dictionary in
216 # --spelling-private-dict-file option instead of raising a message.
217 spelling-store-unknown-words=no
218
219
220 [SIMILARITIES]
221
222 # Minimum lines number of a similarity.
223 min-similarity-lines=4
224
225 # Ignore comments when computing similarities.
226 ignore-comments=yes
227
228 # Ignore docstrings when computing similarities.
229 ignore-docstrings=yes
230
231 # Ignore imports when computing similarities.
232 ignore-imports=no
233
234
235 [VARIABLES]
236
237 # Tells whether we should check for unused import in __init__ files.
238 init-import=no
239
240 # A regular expression matching the name of dummy variables (i.e. expectedly
241 # not used).
242 dummy-variables-rgx=_$|dummy
243
244 # List of additional names supposed to be defined in builtins. Remember that
245 # you should avoid to define new builtins when possible.
246 additional-builtins=__opts__,__virtual__,__salt_system_encoding__,__context__
247
248 # List of strings which can identify a callback function by name. A callback
249 # name must start or end with one of those strings.
250 callbacks=cb_,_cb
251
252
253 [MISCELLANEOUS]
254
255 # List of note tags to take in consideration, separated by a comma.
256 notes=FIXME,XXX,TODO
257
258
259 [BASIC]
260
261 # List of builtins function names that should not be used, separated by a comma
262 bad-functions=map,filter,input
263
264 # Good variable names which should always be accepted, separated by a comma
265 good-names=i,j,k,ex,Run,_,log,pytest_plugins,__opts__,__context__
266
267 # Bad variable names which should always be refused, separated by a comma
268 bad-names=foo,bar,baz,toto,tutu,tata
269
270 # Colon-delimited sets of names that determine each other's naming style when
271 # the name regexes allow several styles.
272 name-group=
273
274 # Include a hint for the correct naming format with invalid-name
275 include-naming-hint=no
276
277 # Regular expression matching correct function names
278 function-rgx=[a-z_][a-z0-9_]{2,60}$
279
280 # Naming hint for function names
281 function-name-hint=[a-z_][a-z0-9_]{2,60}$
282
283 # Regular expression matching correct variable names
284 variable-rgx=[a-z_][a-z0-9_]{2,60}$
285
286 # Naming hint for variable names
287 variable-name-hint=[a-z_][a-z0-9_]{2,60}$
288
289 # Regular expression matching correct constant names
290 const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
291
292 # Naming hint for constant names
293 const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
294
295 # Regular expression matching correct attribute names
296 attr-rgx=[a-z_][a-z0-9_]{2,60}$
297
298 # Naming hint for attribute names
299 attr-name-hint=[a-z_][a-z0-9_]{2,60}$
300
301 # Regular expression matching correct argument names
302 argument-rgx=[a-z_][a-z0-9_]{2,60}$
303
304 # Naming hint for argument names
305 argument-name-hint=[a-z_][a-z0-9_]{2,60}$
306
307 # Regular expression matching correct class attribute names
308 class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,60}|(__.*__))$
309
310 # Naming hint for class attribute names
311 class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,60}|(__.*__))$
312
313 # Regular expression matching correct inline iteration names
314 inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
315
316 # Naming hint for inline iteration names
317 inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
318
319 # Regular expression matching correct class names
320 class-rgx=[A-Z_][a-zA-Z0-9]+$
321
322 # Naming hint for class names
323 class-name-hint=[A-Z_][a-zA-Z0-9]+$
324
325 # Regular expression matching correct module names
326 module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
327
328 # Naming hint for module names
329 module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
330
331 # Regular expression matching correct method names
332 method-rgx=[a-z_][a-z0-9_]{2,60}$
333
334 # Naming hint for method names
335 method-name-hint=[a-z_][a-z0-9_]{2,60}$
336
337 # Regular expression which should only match function or class names that do
338 # not require a docstring.
339 no-docstring-rgx=__.*__
340
341 # Minimum line length for functions/classes that require docstrings, shorter
342 # ones are exempt.
343 docstring-min-length=-1
344
345
346 [FORMAT]
347
348 # Maximum number of characters on a single line.
349 max-line-length=120
350
351 # Regexp for a line that is allowed to be longer than the limit.
352 ignore-long-lines=^\s*(# )?<?https?://\S+>?$
353
354 # Allow the body of an if to be on the same line as the test if there is no
355 # else.
356 single-line-if-stmt=no
357
358 # List of optional constructs for which whitespace checking is disabled
359 no-space-check=trailing-comma,dict-separator
360
361 # Maximum number of lines in a module
362 max-module-lines=1000
363
364 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
365 # tab).
366 indent-string=' '
367
368 # Number of spaces of indent required inside a hanging or continued line.
369 indent-after-paren=4
370
371 # Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
372 expected-line-ending-format=LF
373
374
375 [TYPECHECK]
376
377 # Tells whether missing members accessed in mixin class should be ignored. A
378 # mixin class is detected if its name ends with "mixin" (case insensitive).
379 ignore-mixin-members=yes
380
381 # List of module names for which member attributes should not be checked
382 # (useful for modules/projects where namespaces are manipulated during runtime
383 # and thus existing member attributes cannot be deduced by static analysis
384 ignored-modules=
385
386 # List of classes names for which member attributes should not be checked
387 # (useful for classes with attributes dynamically set).
388 ignored-classes=
389
390 # When zope mode is activated, add a predefined set of Zope acquired attributes
391 # to generated-members.
392 zope=no
393
394 # List of members which are set dynamically and missed by pylint inference
395 # system, and so shouldn't trigger E0201 when accessed. Python regular
396 # expressions are accepted.
397 generated-members=
398
399
400 [IMPORTS]
401
402 # Deprecated modules which should not be used, separated by a comma
403 deprecated-modules=regsub,TERMIOS,Bastion,rexec
404
405 # Create a graph of every (i.e. internal and external) dependencies in the
406 # given file (report RP0402 must not be disabled)
407 import-graph=
408
409 # Create a graph of external dependencies in the given file (report RP0402 must
410 # not be disabled)
411 ext-import-graph=
412
413 # Create a graph of internal dependencies in the given file (report RP0402 must
414 # not be disabled)
415 int-import-graph=
416
417
418 [DESIGN]
419
420 # Maximum number of arguments for function / method
421 max-args=5
422
423 # Argument names that match this expression will be ignored. Default to name
424 # with leading underscore
425 ignored-argument-names=_{1,2}
426
427 # Maximum number of locals for function / method body
428 max-locals=15
429
430 # Maximum number of return / yield for function / method body
431 max-returns=6
432
433 # Maximum number of branch for function / method body
434 max-branches=12
435
436 # Maximum number of statements in function / method body
437 max-statements=50
438
439 # Maximum number of parents for a class (see R0901).
440 max-parents=7
441
442 # Maximum number of attributes for a class (see R0902).
443 max-attributes=7
444
445 # Minimum number of public methods for a class (see R0903).
446 min-public-methods=2
447
448 # Maximum number of public methods for a class (see R0904).
449 max-public-methods=20
450
451
452 [CLASSES]
453
454 # List of method names used to declare (i.e. assign) instance attributes.
455 defining-attr-methods=__init__,__new__,setUp
456
457 # List of valid names for the first argument in a class method.
458 valid-classmethod-first-arg=cls
459
460 # List of valid names for the first argument in a metaclass class method.
461 valid-metaclass-classmethod-first-arg=mcs
462
463 # List of member names, which should be excluded from the protected access
464 # warning.
465 exclude-protected=_asdict,_fields,_replace,_source,_make
466
467
468 [EXCEPTIONS]
469
470 # Exceptions that will emit a warning when being caught. Defaults to
471 # "Exception"
472 overgeneral-exceptions=Exception