blob: e7f44bf1ec7a2b73438e60cd560969b6e161bb2d [file] [log] [blame]
Claudiu Popa0d9e17a2018-10-02 09:52:23 +02001[MASTER]
2
3# Specify a configuration file.
4#rcfile=
5
6# Python code to execute, usually for sys.path manipulation such as
Claudiu Popa0d9e17a2018-10-02 09:52:23 +02007# pygtk.require().
8#init-hook=
9
10# Profiled execution.
11profile=no
12
13# Add files or directories to the blacklist. They should be base names, not
Claudiu Popa0d9e17a2018-10-02 09:52:23 +020014# paths.
15ignore=CVS
16
17# Pickle collected data for later comparisons.
18persistent=yes
19
20# List of plugins (as comma separated values of python modules names) to load,
Claudiu Popa0d9e17a2018-10-02 09:52:23 +020021# usually to register additional checkers.
22load-plugins=
Nick Drozdbc4dd3d2019-12-23 12:28:52 -060023 pylint.extensions.check_elif,
Pierre Sassoulas2376f5e2021-07-10 23:39:03 +020024 pylint.extensions.bad_builtin,
25 pylint.extensions.code_style,
Nick Drozd4704ca72021-08-13 17:38:29 -050026 pylint.extensions.overlapping_exceptions,
27 pylint.extensions.typing,
Pierre Sassoulasa59b1cf2021-09-17 10:09:44 +020028 pylint.extensions.code_style,
29 pylint.extensions.set_membership,
Nick Drozd4704ca72021-08-13 17:38:29 -050030 pylint.extensions.redefined_variable_type,
Claudiu Popa0d9e17a2018-10-02 09:52:23 +020031
32# Use multiple processes to speed up Pylint.
33jobs=1
34
35# Allow loading of arbitrary C extensions. Extensions are imported into the
Claudiu Popa0d9e17a2018-10-02 09:52:23 +020036# active Python interpreter and may run arbitrary code.
37unsafe-load-any-extension=no
38
39# A comma-separated list of package or module names from where C extensions may
Claudiu Popa0d9e17a2018-10-02 09:52:23 +020040# be loaded. Extensions are loading into the active Python interpreter and may
Claudiu Popa0d9e17a2018-10-02 09:52:23 +020041# run arbitrary code
42extension-pkg-whitelist=
43
44
45[REPORTS]
46
47# Set the output format. Available formats are text, parseable, colorized, msvs
Claudiu Popa0d9e17a2018-10-02 09:52:23 +020048# (visual studio) and html. You can also give a reporter class, eg
Claudiu Popa0d9e17a2018-10-02 09:52:23 +020049# mypackage.mymodule.MyReporterClass.
50output-format=text
51
52# Put messages in a separate file for each module / package specified on the
Claudiu Popa0d9e17a2018-10-02 09:52:23 +020053# command line instead of printing them on stdout. Reports (if any) will be
Claudiu Popa0d9e17a2018-10-02 09:52:23 +020054# written in a file name "pylint_global.[txt|html]".
55files-output=no
56
57# Tells whether to display a full report or only the messages
Marc Mueller99385df2021-07-10 23:57:22 +020058reports=no
Claudiu Popa0d9e17a2018-10-02 09:52:23 +020059
60# Python expression which should return a note less than 10 (10 is the highest
Claudiu Popa0d9e17a2018-10-02 09:52:23 +020061# note). You have access to the variables errors warning, statement which
Claudiu Popa0d9e17a2018-10-02 09:52:23 +020062# respectively contain the number of errors / warnings messages and the total
Claudiu Popa0d9e17a2018-10-02 09:52:23 +020063# number of statements analyzed. This is used by the global evaluation report
Claudiu Popa0d9e17a2018-10-02 09:52:23 +020064# (RP0004).
65evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
66
67# Template used to display messages. This is a python new-style format string
Claudiu Popa0d9e17a2018-10-02 09:52:23 +020068# used to format the message information. See doc for all details
69#msg-template=
70
71
72[MESSAGES CONTROL]
73
74# Only show warnings with the listed confidence levels. Leave empty to show
Claudiu Popa0d9e17a2018-10-02 09:52:23 +020075# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
76confidence=
77
Claudiu Popa0d9e17a2018-10-02 09:52:23 +020078
79# Disable the message, report, category or checker with the given id(s). You
Claudiu Popa0d9e17a2018-10-02 09:52:23 +020080# can either give multiple identifiers separated by comma (,) or put this
Claudiu Popa0d9e17a2018-10-02 09:52:23 +020081# option multiple times (only on the command line, not in the configuration
Claudiu Popa0d9e17a2018-10-02 09:52:23 +020082# file where it should appear only once).You can also use "--disable=all" to
Claudiu Popa0d9e17a2018-10-02 09:52:23 +020083# disable everything first and then reenable specific checks. For example, if
Claudiu Popa0d9e17a2018-10-02 09:52:23 +020084# you want to run only the similarities checker, you can use "--disable=all
Claudiu Popa0d9e17a2018-10-02 09:52:23 +020085# --enable=similarities". If you want to run only the classes checker, but have
Claudiu Popa0d9e17a2018-10-02 09:52:23 +020086# no Warning level messages displayed, use"--disable=all --enable=classes
Claudiu Popa0d9e17a2018-10-02 09:52:23 +020087# --disable=W"
88
Pierre Sassoulas305ad822021-04-18 22:32:05 +020089disable=fixme,
90 invalid-name,
91 missing-docstring,
92 too-few-public-methods,
Claudiu Popa0d9e17a2018-10-02 09:52:23 +020093 too-many-public-methods,
Pierre Sassoulas305ad822021-04-18 22:32:05 +020094 too-many-boolean-expressions,
95 too-many-branches,
Pierre Sassoulas305ad822021-04-18 22:32:05 +020096 too-many-statements,
Pierre Sassoulas007b0dc2021-04-18 21:55:01 +020097 # We know about it and we're doing our best to remove it in 2.0 (oups)
Claudiu Popa0d9e17a2018-10-02 09:52:23 +020098 cyclic-import,
Claudiu Popa0d9e17a2018-10-02 09:52:23 +020099 # Requires major redesign for fixing this (and private
100 # access in the same project is fine)
101 protected-access,
102 # Most of them are conforming to an API. Putting staticmethod
103 # all over the place changes the aesthetics when these methods
104 # are following a local pattern (visit methods for instance).
105 no-self-use,
106 # API requirements in most of the occurrences
107 unused-argument,
Claudiu Popa3d58a622018-10-02 09:52:44 +0200108 # black handles these
Claudiu Popae2f3dbd2019-01-15 14:05:57 +0100109 format,
Pierre Sassoulas0941bf32021-04-24 10:03:34 +0200110 # We might want to disable new checkers from master that do not exists
111 # in latest published pylint
112 bad-option-value,
113 # Legacy warning not checked in astroid/brain before we
114 # transitioned to setuptools and added an init.py
Pierre Sassoulas313e1e32021-04-18 21:56:04 +0200115 duplicate-code,
Pierre Sassoulas00f16492021-09-17 09:57:54 +0200116 # This one would help performance but we need to fix the pipeline first
117 # and there are a lot of warning for it
118 consider-using-f-string,
Claudiu Popa0d9e17a2018-10-02 09:52:23 +0200119
Pierre Sassoulas8c88b6e2021-04-18 23:05:36 +0200120enable=useless-suppression
Claudiu Popa0d9e17a2018-10-02 09:52:23 +0200121
122[BASIC]
123
124# List of builtins function names that should not be used, separated by a comma
125bad-functions=
126
127# Good variable names which should always be accepted, separated by a comma
Pierre Sassoulas352aa0f2021-06-21 08:52:56 +0200128good-names=i,j,k,e,ex,f,m,cm,Run,_,n,op,it
Claudiu Popa0d9e17a2018-10-02 09:52:23 +0200129
130# Bad variable names which should always be refused, separated by a comma
131bad-names=foo,bar,baz,toto,tutu,tata
132
133# Colon-delimited sets of names that determine each other's naming style when
Claudiu Popa0d9e17a2018-10-02 09:52:23 +0200134# the name regexes allow several styles.
135name-group=
136
137# Include a hint for the correct naming format with invalid-name
138include-naming-hint=no
139
140# Regular expression matching correct attribute names
141attr-rgx=[a-z_][a-z0-9_]{2,30}$
142
143# Naming hint for attribute names
144attr-name-hint=[a-z_][a-z0-9_]{2,30}$
145
146# Regular expression matching correct constant names
147const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
148
149# Naming hint for constant names
150const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
151
152# Regular expression matching correct method names
153method-rgx=[a-z_][a-z0-9_]{2,30}$
154
155# Naming hint for method names
156method-name-hint=[a-z_][a-z0-9_]{2,30}$
157
158# Regular expression matching correct inline iteration names
159inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
160
161# Naming hint for inline iteration names
162inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
163
164# Regular expression matching correct class names
165class-rgx=[A-Z_][a-zA-Z0-9]+$
166
167# Naming hint for class names
168class-name-hint=[A-Z_][a-zA-Z0-9]+$
169
170# Regular expression matching correct argument names
171argument-rgx=[a-z_][a-z0-9_]{2,30}$
172
173# Naming hint for argument names
174argument-name-hint=[a-z_][a-z0-9_]{2,30}$
175
176# Regular expression matching correct module names
177module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
178
179# Naming hint for module names
180module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
181
182# Regular expression matching correct function names
183function-rgx=[a-z_][a-z0-9_]{2,30}$
184
185# Naming hint for function names
186function-name-hint=[a-z_][a-z0-9_]{2,30}$
187
188# Regular expression matching correct variable names
189variable-rgx=[a-z_][a-z0-9_]{2,30}$
190
191# Naming hint for variable names
192variable-name-hint=[a-z_][a-z0-9_]{2,30}$
193
194# Regular expression matching correct class attribute names
195class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
196
197# Naming hint for class attribute names
198class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
199
200# Regular expression which should only match function or class names that do
201
202# not require a docstring.
203no-docstring-rgx=__.*__
204
205# Minimum line length for functions/classes that require docstrings, shorter
Claudiu Popa0d9e17a2018-10-02 09:52:23 +0200206# ones are exempt.
207docstring-min-length=-1
208
209
210[FORMAT]
211
212# Maximum number of characters on a single line.
213max-line-length=100
214
215# Regexp for a line that is allowed to be longer than the limit.
216ignore-long-lines=^\s*(# )?<?https?://\S+>?$
217
218# Allow the body of an if to be on the same line as the test if there is no
Claudiu Popa0d9e17a2018-10-02 09:52:23 +0200219# else.
220single-line-if-stmt=no
221
222# List of optional constructs for which whitespace checking is disabled
223no-space-check=trailing-comma,dict-separator
224
225# Maximum number of lines in a module
226max-module-lines=3000
227
228# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
Claudiu Popa0d9e17a2018-10-02 09:52:23 +0200229# tab).
230indent-string=' '
231
232# Number of spaces of indent required inside a hanging or continued line.
233indent-after-paren=4
234
235# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
236expected-line-ending-format=
237
238
239[LOGGING]
240
241# Logging modules to check that the string format arguments are in logging
Claudiu Popa0d9e17a2018-10-02 09:52:23 +0200242# function parameter format
243logging-modules=logging
244
245
246[MISCELLANEOUS]
247
248# List of note tags to take in consideration, separated by a comma.
249notes=FIXME,XXX,TODO
250
251
252[SIMILARITIES]
253
254# Minimum lines number of a similarity.
255min-similarity-lines=4
256
257# Ignore comments when computing similarities.
258ignore-comments=yes
259
260# Ignore docstrings when computing similarities.
261ignore-docstrings=yes
262
263# Ignore imports when computing similarities.
Pierre Sassoulas007b0dc2021-04-18 21:55:01 +0200264ignore-imports=yes
Claudiu Popa0d9e17a2018-10-02 09:52:23 +0200265
266
267[SPELLING]
268
269# Spelling dictionary name. Available dictionaries: none. To make it working
Claudiu Popa0d9e17a2018-10-02 09:52:23 +0200270# install python-enchant package.
271spelling-dict=
272
273# List of comma separated words that should not be checked.
274spelling-ignore-words=
275
276# A path to a file that contains private dictionary; one word per line.
277spelling-private-dict-file=
278
279# Tells whether to store unknown words to indicated private dictionary in
Claudiu Popa0d9e17a2018-10-02 09:52:23 +0200280# --spelling-private-dict-file option instead of raising a message.
281spelling-store-unknown-words=no
282
283
284[TYPECHECK]
285
286ignore-on-opaque-inference=n
287# Tells whether missing members accessed in mixin class should be ignored. A
288
289# mixin class is detected if its name ends with "mixin" (case insensitive).
290ignore-mixin-members=yes
291
292# List of module names for which member attributes should not be checked
293
294# (useful for modules/projects where namespaces are manipulated during runtime
295
296# and thus existing member attributes cannot be deduced by static analysis
297ignored-modules=typed_ast.ast3
298
299# List of classes names for which member attributes should not be checked
Claudiu Popa0d9e17a2018-10-02 09:52:23 +0200300# (useful for classes with attributes dynamically set).
301ignored-classes=SQLObject
302
303# List of members which are set dynamically and missed by pylint inference
Claudiu Popa0d9e17a2018-10-02 09:52:23 +0200304# system, and so shouldn't trigger E0201 when accessed. Python regular
Claudiu Popa0d9e17a2018-10-02 09:52:23 +0200305# expressions are accepted.
306generated-members=REQUEST,acl_users,aq_parent
307
308
309[VARIABLES]
310
311# Tells whether we should check for unused import in __init__ files.
312init-import=no
313
314# A regular expression matching the name of dummy variables (i.e. expectedly
Claudiu Popa0d9e17a2018-10-02 09:52:23 +0200315# not used).
316dummy-variables-rgx=_$|dummy
317
318# List of additional names supposed to be defined in builtins. Remember that
Claudiu Popa0d9e17a2018-10-02 09:52:23 +0200319# you should avoid to define new builtins when possible.
320additional-builtins=
321
322# List of strings which can identify a callback function by name. A callback
Claudiu Popa0d9e17a2018-10-02 09:52:23 +0200323# name must start or end with one of those strings.
324callbacks=cb_,_cb
325
326
327[CLASSES]
328
329# List of method names used to declare (i.e. assign) instance attributes.
330defining-attr-methods=__init__,__new__,setUp
331
332# List of valid names for the first argument in a class method.
333valid-classmethod-first-arg=cls
334
335# List of valid names for the first argument in a metaclass class method.
336valid-metaclass-classmethod-first-arg=mcs
337
338# List of member names, which should be excluded from the protected access
Claudiu Popa0d9e17a2018-10-02 09:52:23 +0200339# warning.
340exclude-protected=_asdict,_fields,_replace,_source,_make
341
342
343[DESIGN]
344
345# Maximum number of arguments for function / method
346max-args=10
347
348# Argument names that match this expression will be ignored. Default to name
349
350# with leading underscore
351ignored-argument-names=_.*
352
353# Maximum number of locals for function / method body
354max-locals=25
355
356# Maximum number of return / yield for function / method body
357max-returns=10
358
359# Maximum number of branch for function / method body
360max-branches=25
361
362# Maximum number of statements in function / method body
363max-statements=60
364
365# Maximum number of parents for a class (see R0901).
366max-parents=10
367
368# Maximum number of attributes for a class (see R0902).
369max-attributes=15
370
371# Minimum number of public methods for a class (see R0903).
372min-public-methods=2
373
374# Maximum number of public methods for a class (see R0904).
375max-public-methods=20
376
377
378[IMPORTS]
379
380# Deprecated modules which should not be used, separated by a comma
381deprecated-modules=stringprep,optparse
382
383# Create a graph of every (i.e. internal and external) dependencies in the
Claudiu Popa0d9e17a2018-10-02 09:52:23 +0200384# given file (report RP0402 must not be disabled)
385import-graph=
386
387# Create a graph of external dependencies in the given file (report RP0402 must
Claudiu Popa0d9e17a2018-10-02 09:52:23 +0200388# not be disabled)
389ext-import-graph=
390
391# Create a graph of internal dependencies in the given file (report RP0402 must
Claudiu Popa0d9e17a2018-10-02 09:52:23 +0200392# not be disabled)
393int-import-graph=
394
395
396[EXCEPTIONS]
397
398# Exceptions that will emit a warning when being caught. Defaults to
Claudiu Popa0d9e17a2018-10-02 09:52:23 +0200399# "Exception"
400overgeneral-exceptions=Exception
Marc Mueller162b4a72021-08-16 12:39:46 +0200401
402
403[TYPING]
404
405# Minimum supported python version (used for typing only!)
406py-version = 3.6
407
408# Annotations are used exclusively for type checking
409runtime-typing = no