blob: 326a855c4b466def0d2cd787005137325a31264c [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
Ayu Ishii09858612020-06-26 18:00:52 +000010# Add files or directories to the blocklist. They should be base names, not
maruel@chromium.orgff9a2172012-04-24 16:55:32 +000011# 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=
Mike Frysinger198b5622019-12-09 23:25:20 +000020 pylint_quotes
21
22
23# Configure quote preferences.
24string-quote = single-avoid-escape
25triple-quote = double
26docstring-quote = double
maruel@chromium.org6e29d572010-06-04 17:32:20 +000027
28
29[MESSAGES CONTROL]
30
31# Enable the message, report, category or checker with the given id(s). You can
32# either give multiple identifier separated by comma (,) or put this option
33# multiple time.
34#enable=
35
36# Disable the message, report, category or checker with the given id(s). You
37# can either give multiple identifier separated by comma (,) or put this option
maruel@chromium.orgff9a2172012-04-24 16:55:32 +000038# multiple time (only on the command line, not in the configuration file where
39# it should appear only once).
Quinten Yearsleyb2cc4a92016-12-15 13:53:26 -080040#
41# These should get enabled, but the codebase has too many violations currently:
42# bad-continuation
43# anomalous-backslash-in-string
44# bad-context-manager
45# bad-indentation
46# bad-str-strip-call
47# bad-whitespace
48# cell-var-from-loop
49# deprecated-lambda
50# eval-used
51# function-redefined
52# import-error
53# locally-enabled
54# missing-final-newline
55# no-init
56# no-name-in-module
57# no-self-use
58# not-callable
59# old-style-class
60# protected-access
61# superfluous-parens
62# super-on-old-class
63# too-many-function-args
64# trailing-whitespace
65# unnecessary-semicolon
66# unpacking-non-sequence
67# unused-import
68# useless-else-on-loop
69#
maruel@chromium.orgff9a2172012-04-24 16:55:32 +000070# CHANGED:
Quinten Yearsleyb2cc4a92016-12-15 13:53:26 -080071disable=
72 invalid-name,
73 missing-docstring,
74 too-many-lines,
75 bad-inline-option,
76 locally-disabled,
77 duplicate-code,
78 too-many-ancestors,
79 too-many-instance-attributes,
80 too-few-public-methods,
81 too-many-public-methods,
82 too-many-return-statements,
83 too-many-branches,
84 too-many-arguments,
85 too-many-locals,
86 too-many-statements,
87 abstract-class-not-used,
88 abstract-class-little-used,
89 exec-used,
90 bad-builtin,
91 star-args,
92 deprecated-module,
93 reimported,
94 fixme,
95 global-statement,
96 broad-except,
97 logging-not-lazy,
98 bad-continuation,
99 anomalous-backslash-in-string,
Mike Frysinger862370c2018-07-20 20:02:39 +0000100 assigning-non-slot,
Quinten Yearsleyb2cc4a92016-12-15 13:53:26 -0800101 bad-context-manager,
102 bad-indentation,
103 bad-str-strip-call,
Mike Frysinger862370c2018-07-20 20:02:39 +0000104 bad-super-call,
Quinten Yearsleyb2cc4a92016-12-15 13:53:26 -0800105 bad-whitespace,
106 cell-var-from-loop,
Mike Frysinger862370c2018-07-20 20:02:39 +0000107 consider-using-enumerate,
Quinten Yearsleyb2cc4a92016-12-15 13:53:26 -0800108 deprecated-lambda,
Mike Frysinger862370c2018-07-20 20:02:39 +0000109 deprecated-method,
Quinten Yearsleyb2cc4a92016-12-15 13:53:26 -0800110 eval-used,
111 function-redefined,
112 import-error,
Mike Frysinger198b5622019-12-09 23:25:20 +0000113 invalid-docstring-quote,
114 invalid-string-quote,
115 invalid-triple-quote,
Quinten Yearsleyb2cc4a92016-12-15 13:53:26 -0800116 locally-enabled,
Mike Frysinger862370c2018-07-20 20:02:39 +0000117 misplaced-comparison-constant,
118 misplaced-bare-raise,
Quinten Yearsleyb2cc4a92016-12-15 13:53:26 -0800119 missing-final-newline,
Mike Frysinger862370c2018-07-20 20:02:39 +0000120 multiple-imports,
Quinten Yearsleyb2cc4a92016-12-15 13:53:26 -0800121 no-init,
122 no-name-in-module,
Mike Frysinger862370c2018-07-20 20:02:39 +0000123 no-self-argument,
Quinten Yearsleyb2cc4a92016-12-15 13:53:26 -0800124 no-self-use,
Mike Frysinger862370c2018-07-20 20:02:39 +0000125 not-an-iterable,
Quinten Yearsleyb2cc4a92016-12-15 13:53:26 -0800126 not-callable,
127 old-style-class,
128 protected-access,
Mike Frysinger862370c2018-07-20 20:02:39 +0000129 redefined-variable-type,
130 simplifiable-if-statement,
131 singleton-comparison,
Quinten Yearsleyb2cc4a92016-12-15 13:53:26 -0800132 superfluous-parens,
133 super-on-old-class,
Mike Frysinger862370c2018-07-20 20:02:39 +0000134 too-many-boolean-expressions,
Quinten Yearsleyb2cc4a92016-12-15 13:53:26 -0800135 too-many-function-args,
Mike Frysinger862370c2018-07-20 20:02:39 +0000136 too-many-nested-blocks,
Quinten Yearsleyb2cc4a92016-12-15 13:53:26 -0800137 trailing-whitespace,
Mike Frysinger862370c2018-07-20 20:02:39 +0000138 undefined-variable,
139 ungrouped-imports,
Quinten Yearsleyb2cc4a92016-12-15 13:53:26 -0800140 unnecessary-semicolon,
Mike Frysinger862370c2018-07-20 20:02:39 +0000141 unneeded-not,
Quinten Yearsleyb2cc4a92016-12-15 13:53:26 -0800142 unpacking-non-sequence,
Mike Frysinger862370c2018-07-20 20:02:39 +0000143 unsubscriptable-object,
144 unsupported-membership-test,
Quinten Yearsleyb2cc4a92016-12-15 13:53:26 -0800145 unused-import,
Mike Frysinger862370c2018-07-20 20:02:39 +0000146 useless-else-on-loop,
147 using-constant-test,
148 wrong-import-order,
149 wrong-import-position,
maruel@chromium.org6e29d572010-06-04 17:32:20 +0000150
151
152[REPORTS]
153
154# Set the output format. Available formats are text, parseable, colorized, msvs
155# (visual studio) and html
156output-format=text
157
maruel@chromium.org6e29d572010-06-04 17:32:20 +0000158# Put messages in a separate file for each module / package specified on the
159# command line instead of printing them on stdout. Reports (if any) will be
160# written in a file name "pylint_global.[txt|html]".
161files-output=no
162
163# Tells whether to display a full report or only the messages
maruel@chromium.orgff9a2172012-04-24 16:55:32 +0000164# CHANGED:
maruel@chromium.org6e29d572010-06-04 17:32:20 +0000165reports=no
166
Mike Frysingered485e12019-08-25 23:05:55 +0000167# Activate the evaluation score.
168score=no
169
maruel@chromium.org6e29d572010-06-04 17:32:20 +0000170# Python expression which should return a note less than 10 (10 is the highest
171# note). You have access to the variables errors warning, statement which
172# respectively contain the number of errors / warnings messages and the total
173# number of statements analyzed. This is used by the global evaluation report
maruel@chromium.orgff9a2172012-04-24 16:55:32 +0000174# (RP0004).
maruel@chromium.org6e29d572010-06-04 17:32:20 +0000175evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
176
maruel@chromium.org6e29d572010-06-04 17:32:20 +0000177
maruel@chromium.orgff9a2172012-04-24 16:55:32 +0000178[VARIABLES]
179
180# Tells whether we should check for unused import in __init__ files.
181init-import=no
182
183# A regular expression matching the beginning of the name of dummy variables
184# (i.e. not used).
185dummy-variables-rgx=_|dummy
186
187# List of additional names supposed to be defined in builtins. Remember that
188# you should avoid to define new builtins when possible.
189additional-builtins=
190
191
192[TYPECHECK]
193
194# Tells whether missing members accessed in mixin class should be ignored. A
195# mixin class is detected if its name ends with "mixin" (case insensitive).
196ignore-mixin-members=yes
197
198# List of classes names for which member attributes should not be checked
199# (useful for classes with attributes dynamically set).
maruel@chromium.org90d63882012-04-24 17:52:04 +0000200ignored-classes=SQLObject,twisted.internet.reactor,hashlib,google.appengine.api.memcache
maruel@chromium.orgff9a2172012-04-24 16:55:32 +0000201
maruel@chromium.orgff9a2172012-04-24 16:55:32 +0000202# List of members which are set dynamically and missed by pylint inference
203# system, and so shouldn't trigger E0201 when accessed. Python regular
204# expressions are accepted.
iannucci@chromium.org6f848032012-12-06 17:30:25 +0000205generated-members=REQUEST,acl_users,aq_parent,multiprocessing.managers.SyncManager
maruel@chromium.orgff9a2172012-04-24 16:55:32 +0000206
207
maruel@chromium.org6e29d572010-06-04 17:32:20 +0000208[MISCELLANEOUS]
209
210# List of note tags to take in consideration, separated by a comma.
211notes=FIXME,XXX,TODO
212
213
maruel@chromium.orgff9a2172012-04-24 16:55:32 +0000214[SIMILARITIES]
215
216# Minimum lines number of a similarity.
217min-similarity-lines=4
218
219# Ignore comments when computing similarities.
220ignore-comments=yes
221
222# Ignore docstrings when computing similarities.
223ignore-docstrings=yes
224
225
maruel@chromium.org6e29d572010-06-04 17:32:20 +0000226[FORMAT]
227
228# Maximum number of characters on a single line.
229max-line-length=80
230
231# Maximum number of lines in a module
232max-module-lines=1000
233
234# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
235# tab).
maruel@chromium.orgff9a2172012-04-24 16:55:32 +0000236# CHANGED:
maruel@chromium.org6e29d572010-06-04 17:32:20 +0000237indent-string=' '
238
239
maruel@chromium.org6e29d572010-06-04 17:32:20 +0000240[BASIC]
241
maruel@chromium.org6e29d572010-06-04 17:32:20 +0000242# List of builtins function names that should not be used, separated by a comma
243bad-functions=map,filter,apply,input
244
245# Regular expression which should only match correct module names
246module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
247
248# Regular expression which should only match correct module level names
249const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
250
251# Regular expression which should only match correct class names
252class-rgx=[A-Z_][a-zA-Z0-9]+$
253
254# Regular expression which should only match correct function names
255function-rgx=[a-z_][a-z0-9_]{2,30}$
256
257# Regular expression which should only match correct method names
258method-rgx=[a-z_][a-z0-9_]{2,30}$
259
260# Regular expression which should only match correct instance attribute names
261attr-rgx=[a-z_][a-z0-9_]{2,30}$
262
263# Regular expression which should only match correct argument names
264argument-rgx=[a-z_][a-z0-9_]{2,30}$
265
266# Regular expression which should only match correct variable names
267variable-rgx=[a-z_][a-z0-9_]{2,30}$
268
269# Regular expression which should only match correct list comprehension /
270# generator expression variable names
271inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
272
273# Good variable names which should always be accepted, separated by a comma
274good-names=i,j,k,ex,Run,_
275
276# Bad variable names which should always be refused, separated by a comma
277bad-names=foo,bar,baz,toto,tutu,tata
278
279# Regular expression which should only match functions or classes name which do
280# not require a docstring
281no-docstring-rgx=__.*__
282
283
maruel@chromium.org6e29d572010-06-04 17:32:20 +0000284[DESIGN]
285
286# Maximum number of arguments for function / method
287max-args=5
288
289# Argument names that match this expression will be ignored. Default to name
290# with leading underscore
291ignored-argument-names=_.*
292
293# Maximum number of locals for function / method body
294max-locals=15
295
296# Maximum number of return / yield for function / method body
297max-returns=6
298
299# Maximum number of branch for function / method body
300max-branchs=12
301
302# Maximum number of statements in function / method body
303max-statements=50
304
305# Maximum number of parents for a class (see R0901).
306max-parents=7
307
308# Maximum number of attributes for a class (see R0902).
309max-attributes=7
310
311# Minimum number of public methods for a class (see R0903).
312min-public-methods=2
313
314# Maximum number of public methods for a class (see R0904).
315max-public-methods=20
316
317
maruel@chromium.orgff9a2172012-04-24 16:55:32 +0000318[CLASSES]
319
maruel@chromium.orgff9a2172012-04-24 16:55:32 +0000320# List of method names used to declare (i.e. assign) instance attributes.
321defining-attr-methods=__init__,__new__,setUp
322
323# List of valid names for the first argument in a class method.
324valid-classmethod-first-arg=cls
325
326
maruel@chromium.org6e29d572010-06-04 17:32:20 +0000327[IMPORTS]
328
329# Deprecated modules which should not be used, separated by a comma
330deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
331
332# Create a graph of every (i.e. internal and external) dependencies in the
maruel@chromium.orgff9a2172012-04-24 16:55:32 +0000333# given file (report RP0402 must not be disabled)
maruel@chromium.org6e29d572010-06-04 17:32:20 +0000334import-graph=
335
maruel@chromium.orgff9a2172012-04-24 16:55:32 +0000336# Create a graph of external dependencies in the given file (report RP0402 must
maruel@chromium.org6e29d572010-06-04 17:32:20 +0000337# not be disabled)
338ext-import-graph=
339
maruel@chromium.orgff9a2172012-04-24 16:55:32 +0000340# Create a graph of internal dependencies in the given file (report RP0402 must
maruel@chromium.org6e29d572010-06-04 17:32:20 +0000341# not be disabled)
342int-import-graph=
maruel@chromium.orgff9a2172012-04-24 16:55:32 +0000343
344
345[EXCEPTIONS]
346
347# Exceptions that will emit a warning when being caught. Defaults to
348# "Exception"
349overgeneral-exceptions=Exception