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