1
# lint Python modules using external checkers.
3
# This is the main checker controlling the other ones and the reports
4
# generation. It is itself both a raw checker and an astng checker in order
6
# * handle message activation / deactivation at the module level
7
# * handle some basic but necessary stats'data (number of classes, methods...)
12
# Specify a configuration file.
18
# Add <file or directory> to the black list. It should be a base name, not a
19
# path. You may set this option multiple times.
22
# Pickle collected data for later comparisons.
25
# Set the cache size for astng objects.
28
# List of plugins (as comma separated values of python modules names) to load,
29
# usually to register additional checkers.
35
# Enable only checker(s) with the given id(s). This option conflict with the
36
# disable-checker option
39
# Enable all checker(s) except those with the given id(s). This option conflict
40
# with the disable-checker option
43
# Enable all messages in the listed categories.
46
# Disable all messages in the listed categories.
49
# Enable the message(s) with the given id(s).
52
# Disable the message(s) with the given id(s).
53
# disable-msg=C0323,W0142,C0301,C0103,C0111,E0213,C0302,C0203,W0703,R0201
54
disable-msg=C0111,C0103,W0703,W0702
58
# set the output format. Available formats are text, parseable, colorized and
60
output-format=colorized
62
# Include message's id in output
65
# Put messages in a separate file for each module / package specified on the
66
# command line instead of printing them on stdout. Reports (if any) will be
67
# written in a file name "pylint_global.[txt|html]".
70
# Tells wether to display a full report or only the messages
73
# Python expression which should return a note less than 10 (10 is the highest
74
# note).You have access to the variables errors warning, statement which
75
# respectivly contain the number of errors / warnings messages and the total
76
# number of statements analyzed. This is used by the global evaluation report
78
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
80
# Add a comment according to your evaluation note. This is used by the global
81
# evaluation report (R0004).
84
# Enable the report(s) with the given id(s).
87
# Disable the report(s) with the given id(s).
91
# * unused variables / imports
92
# * undefined variables
93
# * redefinition of variable from builtins or from an outer scope
94
# * use of variable before assigment
98
# Tells wether we should check for unused import in __init__ files.
101
# A regular expression matching names used for dummy variables (i.e. not used).
102
dummy-variables-rgx=_|dummy
104
# List of additional names supposed to be defined in builtins. Remember that
105
# you should avoid to define new builtins when possible.
109
# try to find bugs in the code using type inference
113
# Tells wether missing members accessed in mixin class should be ignored. A
114
# mixin class is detected if its name ends with "mixin" (case insensitive).
115
ignore-mixin-members=yes
117
# When zope mode is activated, consider the acquired-members option to ignore
118
# access to some undefined attributes.
121
# List of members which are usually get through zope's acquisition mecanism and
122
# so shouldn't trigger E0201 when accessed (need zope=yes to be considered).
123
acquired-members=REQUEST,acl_users,aq_parent
128
# * modules / classes / functions / methods / arguments / variables name
129
# * number of arguments, local variables, branches, returns and statements in
131
# * required module attributes
132
# * dangerous default values as arguments
133
# * redefinition of function / method / class
134
# * uses of the global statement
138
# Required attributes for module, separated by a comma
141
# Regular expression which should only match functions or classes name which do
142
# not require a docstring
143
no-docstring-rgx=__.*__
145
# Regular expression which should only match correct module names
146
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
148
# Regular expression which should only match correct module level names
149
const-rgx=(([A-Z_][A-Z1-9_]*)|(__.*__))$
151
# Regular expression which should only match correct class names
152
class-rgx=[A-Z_][a-zA-Z0-9]+$
154
# Regular expression which should only match correct function names
155
function-rgx=[a-z_][a-z0-9_]{2,30}$
157
# Regular expression which should only match correct method names
158
method-rgx=[a-z_][a-z0-9_]{2,30}$
160
# Regular expression which should only match correct instance attribute names
161
attr-rgx=[a-z_][a-z0-9_]{2,30}$
163
# Regular expression which should only match correct argument names
164
argument-rgx=[a-z_][a-z0-9_]{2,30}$
166
# Regular expression which should only match correct variable names
167
variable-rgx=[a-z_][a-z0-9_]{2,30}$
169
# Regular expression which should only match correct list comprehension /
170
# generator expression variable names
171
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
173
# Good variable names which should always be accepted, separated by a comma
174
good-names=i,j,k,ex,Run,_
176
# Bad variable names which should always be refused, separated by a comma
177
bad-names=foo,bar,baz,toto,tutu,tata
179
# List of builtins function names that should not be used, separated by a comma
180
bad-functions=apply,input
183
# checks for sign of poor/misdesign:
184
# * number of methods, attributes, local variables...
185
# * size, complexity of functions, methods
189
# Maximum number of arguments for function / method
192
# Maximum number of locals for function / method body
195
# Maximum number of return / yield for function / method body
198
# Maximum number of branch for function / method body
201
# Maximum number of statements in function / method body
204
# Maximum number of parents for a class (see R0901).
207
# Maximum number of attributes for a class (see R0902).
210
# Minimum number of public methods for a class (see R0903).
213
# Maximum number of public methods for a class (see R0904).
214
max-public-methods=20
218
# * external modules dependencies
219
# * relative / wildcard imports
221
# * uses of deprecated modules
225
# Deprecated modules which should not be used, separated by a comma
226
deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
228
# Create a graph of every (i.e. internal and external) dependencies in the
229
# given file (report R0402 must not be disabled)
232
# Create a graph of external dependencies in the given file (report R0402 must
236
# Create a graph of internal dependencies in the given file (report R0402 must
242
# * methods without self as first argument
243
# * overridden methods signature
244
# * access only to existant members via self
245
# * attributes not defined in the __init__ method
246
# * supported interfaces implementation
251
# List of interface methods to ignore, separated by a comma. This is used for
252
# instance to not check methods defines in Zope's Interface base class.
253
# ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
255
# List of method names used to declare (i.e. assign) instance attributes.
256
defining-attr-methods=__init__,__new__,setUp
259
# checks for similarities and duplicated code. This computation may be
260
# memory / CPU intensive, so you should disable it if you experiments some
265
# Minimum lines number of a similarity.
266
min-similarity-lines=5
268
# Ignore comments when computing similarities.
271
# Ignore docstrings when computing similarities.
272
ignore-docstrings=yes
276
# * warning notes in the code like FIXME, XXX
277
# * PEP 263: source code with non ascii character but no encoding declaration
281
# List of note tags to take in consideration, separated by a comma.
282
notes=FIXME,XXX,TODO,BUG:
286
# * unauthorized constructions
287
# * strict indentation
289
# * use of <> instead of !=
293
# Maximum number of characters on a single line.
296
# Maximum number of lines in a module
297
max-module-lines=1000
299
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
305
disable-msg=C0301,C0111,C0103,R0201,W0702,C0324