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