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