1
# lint Python modules using external checkers.
3
# This is the main checker controling 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...)
9
# This checker also defines the following reports:
10
# * R0001: Total errors / warnings
11
# * R0002: % errors / warnings by module
13
# * R0004: Global evaluation
1
# lint Python modules using external checkers.
3
# This is the main checker controling 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...)
16
14
# Add <file or directory> to the black list. It should be a base name, not a
17
15
# path. You may set this option multiple times.
23
21
# Set the cache size for astng objects.
24
# List of plugins (as comma separated values of python modules names) to load,
25
# usually to register additional checkers.
29
# Tells wether to display a full report or only the messages
32
# Use HTML as output format instead of text
35
# Use a parseable text output format, so your favorite text editor will be able
36
# to jump to the line corresponding to a message.
39
# Colorizes text output using ansi escape codes
35
# set the output format. Available formats are text, parseable, colorized and
39
# Include message's id in output
42
42
# Put messages in a separate file for each module / package specified on the
43
43
# command line instead of printing them on stdout. Reports (if any) will be
44
44
# written in a file name "pylint_global.[txt|html]".
47
# Tells wether to display a full report or only the messages
47
50
# Python expression which should return a note less than 10 (10 is the highest
48
51
# note).You have access to the variables errors warning, statement which
49
52
# respectivly contain the number of errors / warnings messages and the total
55
58
# evaluation report (R0004).
58
# Include message's id in output
64
# * unused variables / imports
65
# * undefined variables
66
# * redefinition of variable from builtins or from an outer scope
67
# * use of variable before assigment
70
# Enable / disable this checker
73
# Tells wether we should check for unused import in __init__ files.
76
# List of variable names used for dummy variables (i.e. not used).
77
dummy-variables=_,dummy
83
# * modules / classes / functions / methods / arguments / variables name
84
# * number of arguments, local variables, branchs, returns and statements in
86
# * required module attributes
87
# * dangerous default values as arguments
88
# * redefinition of function / method / class
89
# * uses of the global statement
91
# This checker also defines the following reports:
92
# * R0101: Statistics by type
64
# * modules / classes / functions / methods / arguments / variables name
65
# * number of arguments, local variables, branchs, returns and statements in
67
# * required module attributes
68
# * dangerous default values as arguments
69
# * redefinition of function / method / class
70
# * uses of the global statement
95
# Enable / disable this checker
98
74
# Required attributes for module, separated by a comma
99
required-attributes=__revision__
101
77
# Regular expression which should only match functions or classes name which do
102
78
# not require a docstring
103
79
no-docstring-rgx=__.*__
105
# Minimal length for module / class / function / method / argument / variable
109
81
# Regular expression which should only match correct module names
110
82
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
84
# Regular expression which should only match correct module level names
85
const-rgx=(([A-Z_][A-Z1-9_]*)|(__.*__))$
112
87
# Regular expression which should only match correct class names
113
88
class-rgx=[A-Z_][a-zA-Z0-9]+$
115
90
# Regular expression which should only match correct function names
116
function-rgx=[a-z_][a-z0-9_]*$
91
function-rgx=[a-z_][a-z0-9_]{2,30}$
118
93
# Regular expression which should only match correct method names
119
method-rgx=[a-z_][a-z0-9_]*$
94
method-rgx=[a-z_][a-z0-9_]{2,30}$
96
# Regular expression which should only match correct instance attribute names
97
attr-rgx=[a-z_][a-z0-9_]{2,30}$
121
99
# Regular expression which should only match correct argument names
122
argument-rgx=[a-z_][a-z0-9_]*$
100
argument-rgx=[a-z_][a-z0-9_]{2,30}$
124
102
# Regular expression which should only match correct variable names
125
variable-rgx=[a-z_][a-z0-9_]*$
103
variable-rgx=[a-z_][a-z0-9_]{2,30}$
105
# Regular expression which should only match correct list comprehension /
106
# generator expression variable names
107
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
127
109
# Good variable names which should always be accepted, separated by a comma
128
110
good-names=i,j,k,ex,Run,_
134
116
bad-functions=map,filter,apply,input
138
# checks for sign of poor/misdesign:
139
# * number of methods, attributes, local variables...
140
# * size, complexity of functions, methods
119
# try to find bugs in the code using type inference
123
# Tells wether missing members accessed in mixin class should be ignored. A
124
# mixin class is detected if its name ends with "mixin" (case insensitive).
125
ignore-mixin-members=yes
127
# When zope mode is activated, consider the acquired-members option to ignore
128
# access to some undefined attributes.
131
# List of members which are usually get through zope's acquisition mecanism and
132
# so shouldn't trigger E0201 when accessed (need zope=yes to be considered).
133
acquired-members=REQUEST,acl_users,aq_parent
137
# * unused variables / imports
138
# * undefined variables
139
# * redefinition of variable from builtins or from an outer scope
140
# * use of variable before assigment
144
# Tells wether we should check for unused import in __init__ files.
147
# A regular expression matching names used for dummy variables (i.e. not used).
148
dummy-variables-rgx=_|dummy
150
# List of additional names supposed to be defined in builtins. Remember that
151
# you should avoid to define new builtins when possible.
156
# * methods without self as first argument
157
# * overridden methods signature
158
# * access only to existant members via self
159
# * attributes not defined in the __init__ method
160
# * supported interfaces implementation
165
# List of interface methods to ignore, separated by a comma. This is used for
166
# instance to not check methods defines in Zope's Interface base class.
167
ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
169
# List of method names used to declare (i.e. assign) instance attributes.
170
defining-attr-methods=__init__,__new__,setUp
173
# checks for sign of poor/misdesign:
174
# * number of methods, attributes, local variables...
175
# * size, complexity of functions, methods
143
# Enable / disable this checker
146
179
# Maximum number of arguments for function / method
171
204
max-public-methods=20
176
# * external modules dependencies
177
# * relative / wildcard imports
179
# * uses of deprecated modules
181
# This checker also defines the following reports:
182
# * R0401: External dependencies
183
# * R0402: Modules dependencies graph
208
# * external modules dependencies
209
# * relative / wildcard imports
211
# * uses of deprecated modules
186
# Enable / disable this checker
189
215
# Deprecated modules which should not be used, separated by a comma
190
216
deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
192
# Create a graph of every (i.e. internal and external) dependencies in the given
193
# file (report R0402 must not be disabled)
218
# Create a graph of every (i.e. internal and external) dependencies in the
219
# given file (report R0402 must not be disabled)
196
222
# Create a graph of external dependencies in the given file (report R0402 must
202
228
int-import-graph=
207
# * methods without self as first argument
208
# * overriden methods signature
209
# * access only to existant members via self
210
# * attributes not defined in the __init__ method
211
# * supported interfaces implementation
215
# Enable / disable this checker
218
# List of interface methods to ignore, separated by a comma. This is used for
219
# instance to not check methods defines in Zope's Interface base class.
220
ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
222
# Tells wether missing members accessed in mixin class should be ignored. A
223
# mixin class is detected if its name ends with "mixin" (case insensitive).
224
ignore-mixin-members=yes
229
# * excepts without exception filter
230
# * string exceptions
233
# Enable / disable this checker
234
enable-exceptions=yes
238
# does not check anything but gives some raw metrics :
239
# * total number of lines
240
# * total number of code lines
241
# * total number of docstring lines
242
# * total number of comments lines
243
# * total number of empty lines
245
# This checker also defines the following reports:
246
# * R0701: Raw metrics
249
# Enable / disable this checker
232
# * unauthorized constructions
233
# * strict indentation
235
# * use of <> instead of !=
239
# Maximum number of characters on a single line.
242
# Maximum number of lines in a module
243
max-module-lines=1000
245
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
251
# * warning notes in the code like FIXME, XXX
252
# * PEP 263: source code with non ascii character but no encoding declaration
256
# List of note tags to take in consideration, separated by a comma.
254
260
# checks for similarities and duplicated code. This computation may be
255
# memory / CPU intensive, so you should disable it if you experiments some
258
# This checker also defines the following reports:
259
# * R0801: Duplication
261
# memory / CPU intensive, so you should disable it if you experiments some
262
# Enable / disable this checker
263
enable-similarities=yes
265
266
# Minimum lines number of a similarity.
266
267
min-similarity-lines=4
268
269
# Ignore comments when computing similarities.
269
270
ignore-comments=yes
274
# * warning notes in the code like FIXME, XXX
275
# * PEP 263: source code with non ascii character but no encoding declaration
278
# Enable / disable this checker
279
enable-miscellaneous=yes
281
# List of note tags to take in consideration, separated by a comma. Default to
288
# * unauthorized constructions
289
# * strict indentation
291
# * use of <> instead of !=
294
# Enable / disable this checker
297
# Maximum number of characters on a single line.
300
# Maximum number of lines in a module
301
max-module-lines=1000
303
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 tab).
272
# Ignore docstrings when computing similarities.
273
ignore-docstrings=yes