blob: 20f2a6a07076cbefc431f431b5ffada321d4d71b [file] [log] [blame]
maruel@chromium.org6e29d572010-06-04 17:32:20 +00001[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
maruel@chromium.orgff9a2172012-04-24 16:55:32 +000010# Add files or directories to the blacklist. They should be base names, not
11# paths.
maruel@chromium.org6e29d572010-06-04 17:32:20 +000012ignore=CVS
13
14# Pickle collected data for later comparisons.
15persistent=yes
16
17# List of plugins (as comma separated values of python modules names) to load,
18# usually to register additional checkers.
19load-plugins=
20
21
22[MESSAGES CONTROL]
23
24# Enable the message, report, category or checker with the given id(s). You can
25# either give multiple identifier separated by comma (,) or put this option
26# multiple time.
27#enable=
28
29# Disable the message, report, category or checker with the given id(s). You
30# can either give multiple identifier separated by comma (,) or put this option
maruel@chromium.orgff9a2172012-04-24 16:55:32 +000031# multiple time (only on the command line, not in the configuration file where
32# it should appear only once).
Quinten Yearsleyb2cc4a92016-12-15 13:53:26 -080033#
34# These should get enabled, but the codebase has too many violations currently:
35# bad-continuation
36# anomalous-backslash-in-string
37# bad-context-manager
38# bad-indentation
39# bad-str-strip-call
40# bad-whitespace
41# cell-var-from-loop
42# deprecated-lambda
43# eval-used
44# function-redefined
45# import-error
46# locally-enabled
47# missing-final-newline
48# no-init
49# no-name-in-module
50# no-self-use
51# not-callable
52# old-style-class
53# protected-access
54# superfluous-parens
55# super-on-old-class
56# too-many-function-args
57# trailing-whitespace
58# unnecessary-semicolon
59# unpacking-non-sequence
60# unused-import
61# useless-else-on-loop
62#
maruel@chromium.orgff9a2172012-04-24 16:55:32 +000063# CHANGED:
Quinten Yearsleyb2cc4a92016-12-15 13:53:26 -080064disable=
65 invalid-name,
66 missing-docstring,
67 too-many-lines,
68 bad-inline-option,
69 locally-disabled,
70 duplicate-code,
71 too-many-ancestors,
72 too-many-instance-attributes,
73 too-few-public-methods,
74 too-many-public-methods,
75 too-many-return-statements,
76 too-many-branches,
77 too-many-arguments,
78 too-many-locals,
79 too-many-statements,
80 abstract-class-not-used,
81 abstract-class-little-used,
82 exec-used,
83 bad-builtin,
84 star-args,
85 deprecated-module,
86 reimported,
87 fixme,
88 global-statement,
89 broad-except,
90 logging-not-lazy,
91 bad-continuation,
92 anomalous-backslash-in-string,
Mike Frysinger862370c2018-07-20 20:02:39 +000093 assigning-non-slot,
Quinten Yearsleyb2cc4a92016-12-15 13:53:26 -080094 bad-context-manager,
95 bad-indentation,
96 bad-str-strip-call,
Mike Frysinger862370c2018-07-20 20:02:39 +000097 bad-super-call,
Quinten Yearsleyb2cc4a92016-12-15 13:53:26 -080098 bad-whitespace,
99 cell-var-from-loop,
Mike Frysinger862370c2018-07-20 20:02:39 +0000100 consider-using-enumerate,
Quinten Yearsleyb2cc4a92016-12-15 13:53:26 -0800101 deprecated-lambda,
Mike Frysinger862370c2018-07-20 20:02:39 +0000102 deprecated-method,
Quinten Yearsleyb2cc4a92016-12-15 13:53:26 -0800103 eval-used,
104 function-redefined,
105 import-error,
106 locally-enabled,
Mike Frysinger862370c2018-07-20 20:02:39 +0000107 misplaced-comparison-constant,
108 misplaced-bare-raise,
Quinten Yearsleyb2cc4a92016-12-15 13:53:26 -0800109 missing-final-newline,
Mike Frysinger862370c2018-07-20 20:02:39 +0000110 multiple-imports,
Quinten Yearsleyb2cc4a92016-12-15 13:53:26 -0800111 no-init,
112 no-name-in-module,
Mike Frysinger862370c2018-07-20 20:02:39 +0000113 no-self-argument,
Quinten Yearsleyb2cc4a92016-12-15 13:53:26 -0800114 no-self-use,
Mike Frysinger862370c2018-07-20 20:02:39 +0000115 not-an-iterable,
Quinten Yearsleyb2cc4a92016-12-15 13:53:26 -0800116 not-callable,
117 old-style-class,
118 protected-access,
Mike Frysinger862370c2018-07-20 20:02:39 +0000119 redefined-variable-type,
120 simplifiable-if-statement,
121 singleton-comparison,
Quinten Yearsleyb2cc4a92016-12-15 13:53:26 -0800122 superfluous-parens,
123 super-on-old-class,
Mike Frysinger862370c2018-07-20 20:02:39 +0000124 too-many-boolean-expressions,
Quinten Yearsleyb2cc4a92016-12-15 13:53:26 -0800125 too-many-function-args,
Mike Frysinger862370c2018-07-20 20:02:39 +0000126 too-many-nested-blocks,
Quinten Yearsleyb2cc4a92016-12-15 13:53:26 -0800127 trailing-whitespace,
Mike Frysinger862370c2018-07-20 20:02:39 +0000128 undefined-variable,
129 ungrouped-imports,
Quinten Yearsleyb2cc4a92016-12-15 13:53:26 -0800130 unnecessary-semicolon,
Mike Frysinger862370c2018-07-20 20:02:39 +0000131 unneeded-not,
Quinten Yearsleyb2cc4a92016-12-15 13:53:26 -0800132 unpacking-non-sequence,
Mike Frysinger862370c2018-07-20 20:02:39 +0000133 unsubscriptable-object,
134 unsupported-membership-test,
Quinten Yearsleyb2cc4a92016-12-15 13:53:26 -0800135 unused-import,
Mike Frysinger862370c2018-07-20 20:02:39 +0000136 useless-else-on-loop,
137 using-constant-test,
138 wrong-import-order,
139 wrong-import-position,
maruel@chromium.org6e29d572010-06-04 17:32:20 +0000140
141
142[REPORTS]
143
144# Set the output format. Available formats are text, parseable, colorized, msvs
145# (visual studio) and html
146output-format=text
147
maruel@chromium.org6e29d572010-06-04 17:32:20 +0000148# Put messages in a separate file for each module / package specified on the
149# command line instead of printing them on stdout. Reports (if any) will be
150# written in a file name "pylint_global.[txt|html]".
151files-output=no
152
153# Tells whether to display a full report or only the messages
maruel@chromium.orgff9a2172012-04-24 16:55:32 +0000154# CHANGED:
maruel@chromium.org6e29d572010-06-04 17:32:20 +0000155reports=no
156
Mike Frysingered485e12019-08-25 23:05:55 +0000157# Activate the evaluation score.
158score=no
159
maruel@chromium.org6e29d572010-06-04 17:32:20 +0000160# Python expression which should return a note less than 10 (10 is the highest
161# note). You have access to the variables errors warning, statement which
162# respectively contain the number of errors / warnings messages and the total
163# number of statements analyzed. This is used by the global evaluation report
maruel@chromium.orgff9a2172012-04-24 16:55:32 +0000164# (RP0004).
maruel@chromium.org6e29d572010-06-04 17:32:20 +0000165evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
166
maruel@chromium.org6e29d572010-06-04 17:32:20 +0000167
maruel@chromium.orgff9a2172012-04-24 16:55:32 +0000168[VARIABLES]
169
170# Tells whether we should check for unused import in __init__ files.
171init-import=no
172
173# A regular expression matching the beginning of the name of dummy variables
174# (i.e. not used).
175dummy-variables-rgx=_|dummy
176
177# List of additional names supposed to be defined in builtins. Remember that
178# you should avoid to define new builtins when possible.
179additional-builtins=
180
181
182[TYPECHECK]
183
184# Tells whether missing members accessed in mixin class should be ignored. A
185# mixin class is detected if its name ends with "mixin" (case insensitive).
186ignore-mixin-members=yes
187
188# List of classes names for which member attributes should not be checked
189# (useful for classes with attributes dynamically set).
maruel@chromium.org90d63882012-04-24 17:52:04 +0000190ignored-classes=SQLObject,twisted.internet.reactor,hashlib,google.appengine.api.memcache
maruel@chromium.orgff9a2172012-04-24 16:55:32 +0000191
maruel@chromium.orgff9a2172012-04-24 16:55:32 +0000192# List of members which are set dynamically and missed by pylint inference
193# system, and so shouldn't trigger E0201 when accessed. Python regular
194# expressions are accepted.
iannucci@chromium.org6f848032012-12-06 17:30:25 +0000195generated-members=REQUEST,acl_users,aq_parent,multiprocessing.managers.SyncManager
maruel@chromium.orgff9a2172012-04-24 16:55:32 +0000196
197
maruel@chromium.org6e29d572010-06-04 17:32:20 +0000198[MISCELLANEOUS]
199
200# List of note tags to take in consideration, separated by a comma.
201notes=FIXME,XXX,TODO
202
203
maruel@chromium.orgff9a2172012-04-24 16:55:32 +0000204[SIMILARITIES]
205
206# Minimum lines number of a similarity.
207min-similarity-lines=4
208
209# Ignore comments when computing similarities.
210ignore-comments=yes
211
212# Ignore docstrings when computing similarities.
213ignore-docstrings=yes
214
215
maruel@chromium.org6e29d572010-06-04 17:32:20 +0000216[FORMAT]
217
218# Maximum number of characters on a single line.
219max-line-length=80
220
221# Maximum number of lines in a module
222max-module-lines=1000
223
224# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
225# tab).
maruel@chromium.orgff9a2172012-04-24 16:55:32 +0000226# CHANGED:
maruel@chromium.org6e29d572010-06-04 17:32:20 +0000227indent-string=' '
228
229
maruel@chromium.org6e29d572010-06-04 17:32:20 +0000230[BASIC]
231
maruel@chromium.org6e29d572010-06-04 17:32:20 +0000232# List of builtins function names that should not be used, separated by a comma
233bad-functions=map,filter,apply,input
234
235# Regular expression which should only match correct module names
236module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
237
238# Regular expression which should only match correct module level names
239const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
240
241# Regular expression which should only match correct class names
242class-rgx=[A-Z_][a-zA-Z0-9]+$
243
244# Regular expression which should only match correct function names
245function-rgx=[a-z_][a-z0-9_]{2,30}$
246
247# Regular expression which should only match correct method names
248method-rgx=[a-z_][a-z0-9_]{2,30}$
249
250# Regular expression which should only match correct instance attribute names
251attr-rgx=[a-z_][a-z0-9_]{2,30}$
252
253# Regular expression which should only match correct argument names
254argument-rgx=[a-z_][a-z0-9_]{2,30}$
255
256# Regular expression which should only match correct variable names
257variable-rgx=[a-z_][a-z0-9_]{2,30}$
258
259# Regular expression which should only match correct list comprehension /
260# generator expression variable names
261inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
262
263# Good variable names which should always be accepted, separated by a comma
264good-names=i,j,k,ex,Run,_
265
266# Bad variable names which should always be refused, separated by a comma
267bad-names=foo,bar,baz,toto,tutu,tata
268
269# Regular expression which should only match functions or classes name which do
270# not require a docstring
271no-docstring-rgx=__.*__
272
273
maruel@chromium.org6e29d572010-06-04 17:32:20 +0000274[DESIGN]
275
276# Maximum number of arguments for function / method
277max-args=5
278
279# Argument names that match this expression will be ignored. Default to name
280# with leading underscore
281ignored-argument-names=_.*
282
283# Maximum number of locals for function / method body
284max-locals=15
285
286# Maximum number of return / yield for function / method body
287max-returns=6
288
289# Maximum number of branch for function / method body
290max-branchs=12
291
292# Maximum number of statements in function / method body
293max-statements=50
294
295# Maximum number of parents for a class (see R0901).
296max-parents=7
297
298# Maximum number of attributes for a class (see R0902).
299max-attributes=7
300
301# Minimum number of public methods for a class (see R0903).
302min-public-methods=2
303
304# Maximum number of public methods for a class (see R0904).
305max-public-methods=20
306
307
maruel@chromium.orgff9a2172012-04-24 16:55:32 +0000308[CLASSES]
309
maruel@chromium.orgff9a2172012-04-24 16:55:32 +0000310# List of method names used to declare (i.e. assign) instance attributes.
311defining-attr-methods=__init__,__new__,setUp
312
313# List of valid names for the first argument in a class method.
314valid-classmethod-first-arg=cls
315
316
maruel@chromium.org6e29d572010-06-04 17:32:20 +0000317[IMPORTS]
318
319# Deprecated modules which should not be used, separated by a comma
320deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
321
322# Create a graph of every (i.e. internal and external) dependencies in the
maruel@chromium.orgff9a2172012-04-24 16:55:32 +0000323# given file (report RP0402 must not be disabled)
maruel@chromium.org6e29d572010-06-04 17:32:20 +0000324import-graph=
325
maruel@chromium.orgff9a2172012-04-24 16:55:32 +0000326# Create a graph of external dependencies in the given file (report RP0402 must
maruel@chromium.org6e29d572010-06-04 17:32:20 +0000327# not be disabled)
328ext-import-graph=
329
maruel@chromium.orgff9a2172012-04-24 16:55:32 +0000330# Create a graph of internal dependencies in the given file (report RP0402 must
maruel@chromium.org6e29d572010-06-04 17:32:20 +0000331# not be disabled)
332int-import-graph=
maruel@chromium.orgff9a2172012-04-24 16:55:32 +0000333
334
335[EXCEPTIONS]
336
337# Exceptions that will emit a warning when being caught. Defaults to
338# "Exception"
339overgeneral-exceptions=Exception