1
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
2
# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
4
# lint Python modules using external checkers.
6
# This is the main checker controling the other ones and the reports
7
# generation. It is itself both a raw checker and an astng checker in order
9
# * handle message activation / deactivation at the module level
10
# * handle some basic but necessary stats'data (number of classes, methods...)
14
# Specify a configuration file.
17
# Python code to execute, usually for sys.path manipulation such as
24
# Add <file or directory> to the black list. It should be a base name, not a
25
# path. You may set this option multiple times.
28
# Pickle collected data for later comparisons.
31
# Set the cache size for astng objects.
34
# List of plugins (as comma separated values of python modules names) to load,
35
# usually to register additional checkers.
41
# Enable only checker(s) with the given id(s). This option conflicts with the
42
# disable-checker option
45
# Enable all checker(s) except those with the given id(s). This option
46
# conflicts with the enable-checker option
49
# Enable all messages in the listed categories.
52
# Disable all messages in the listed categories.
55
# Enable the message(s) with the given id(s).
59
# Disable the message(s) with the given id(s).
62
# Messages that are just silly:
69
# Messages that may be silly:
73
superfluous-parens,bad-continuation,
74
# Messages that are noisy for now, eventually maybe we'll turn them on:
80
msg-template={path}:{line}: {msg} ({symbol})
84
# set the output format. Available formats are text, parseable, colorized, msvs
85
# (visual studio) and html
88
# Put messages in a separate file for each module / package specified on the
89
# command line instead of printing them on stdout. Reports (if any) will be
90
# written in a file name "pylint_global.[txt|html]".
93
# Tells wether to display a full report or only the messages
96
# Python expression which should return a note less than 10 (10 is the highest
97
# note).You have access to the variables errors warning, statement which
98
# respectivly contain the number of errors / warnings messages and the total
99
# number of statements analyzed. This is used by the global evaluation report
101
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
103
# Add a comment according to your evaluation note. This is used by the global
104
# evaluation report (R0004).
107
# Enable the report(s) with the given id(s).
110
# Disable the report(s) with the given id(s).
116
# * modules / classes / functions / methods / arguments / variables name
117
# * number of arguments, local variables, branchs, returns and statements in
119
# * required module attributes
120
# * dangerous default values as arguments
121
# * redefinition of function / method / class
122
# * uses of the global statement
126
# Required attributes for module, separated by a comma
129
# Regular expression which should only match functions or classes name which do
130
# not require a docstring
131
# Special methods don't: __foo__
132
# Test methods don't: testXXXX
133
# TestCase overrides don't: setUp, tearDown
134
# Dispatched methods don't: _xxx__Xxxx
135
no-docstring-rgx=__.*__|test[A-Z_].*|setUp|tearDown|_.*__.*
137
# Regular expression which should only match correct module names
138
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
140
# Regular expression which should only match correct module level names
141
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
143
# Regular expression which should only match correct class names
144
class-rgx=[A-Z_][a-zA-Z0-9]+$
146
# Regular expression which should only match correct function names
147
function-rgx=[a-z_][a-z0-9_]{2,30}$
149
# Regular expression which should only match correct method names
150
method-rgx=[a-z_][a-z0-9_]{2,30}$|setUp|tearDown|test_.*
152
# Regular expression which should only match correct instance attribute names
153
attr-rgx=[a-z_][a-z0-9_]{2,30}$
155
# Regular expression which should only match correct argument names
156
argument-rgx=[a-z_][a-z0-9_]{2,30}$
158
# Regular expression which should only match correct variable names
159
variable-rgx=[a-z_][a-z0-9_]{2,30}$
161
# Regular expression which should only match correct list comprehension /
162
# generator expression variable names
163
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
165
# Good variable names which should always be accepted, separated by a comma
166
good-names=i,j,k,ex,Run,_
168
# Bad variable names which should always be refused, separated by a comma
169
bad-names=foo,bar,baz,toto,tutu,tata
171
# List of builtins function names that should not be used, separated by a comma
175
# try to find bugs in the code using type inference
179
# Tells wether missing members accessed in mixin class should be ignored. A
180
# mixin class is detected if its name ends with "mixin" (case insensitive).
181
ignore-mixin-members=yes
183
# List of classes names for which member attributes should not be checked
184
# (useful for classes with attributes dynamicaly set).
185
ignored-classes=SQLObject
187
# When zope mode is activated, consider the acquired-members option to ignore
188
# access to some undefined attributes.
191
# List of members which are usually get through zope's acquisition mecanism and
192
# so shouldn't trigger E0201 when accessed (need zope=yes to be considered).
193
acquired-members=REQUEST,acl_users,aq_parent
197
# * unused variables / imports
198
# * undefined variables
199
# * redefinition of variable from builtins or from an outer scope
200
# * use of variable before assigment
204
# Tells wether we should check for unused import in __init__ files.
207
# A regular expression matching names used for dummy variables (i.e. not used).
208
dummy-variables-rgx=_|dummy|unused|.*_unused
210
# List of additional names supposed to be defined in builtins. Remember that
211
# you should avoid to define new builtins when possible.
216
# * methods without self as first argument
217
# * overridden methods signature
218
# * access only to existant members via self
219
# * attributes not defined in the __init__ method
220
# * supported interfaces implementation
225
# List of interface methods to ignore, separated by a comma. This is used for
226
# instance to not check methods defines in Zope's Interface base class.
227
ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
229
# List of method names used to declare (i.e. assign) instance attributes.
230
defining-attr-methods=__init__,__new__,setUp,reset
233
# checks for sign of poor/misdesign:
234
# * number of methods, attributes, local variables...
235
# * size, complexity of functions, methods
239
# Maximum number of arguments for function / method
242
# Maximum number of locals for function / method body
245
# Maximum number of return / yield for function / method body
248
# Maximum number of branch for function / method body
251
# Maximum number of statements in function / method body
254
# Maximum number of parents for a class (see R0901).
257
# Maximum number of attributes for a class (see R0902).
260
# Minimum number of public methods for a class (see R0903).
263
# Maximum number of public methods for a class (see R0904).
264
max-public-methods=500
268
# * external modules dependencies
269
# * relative / wildcard imports
271
# * uses of deprecated modules
275
# Deprecated modules which should not be used, separated by a comma
276
deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
278
# Create a graph of every (i.e. internal and external) dependencies in the
279
# given file (report R0402 must not be disabled)
282
# Create a graph of external dependencies in the given file (report R0402 must
286
# Create a graph of internal dependencies in the given file (report R0402 must
292
# * unauthorized constructions
293
# * strict indentation
295
# * use of <> instead of !=
299
# Maximum number of characters on a single line.
302
# Maximum number of lines in a module
303
max-module-lines=10000
305
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
311
# * warning notes in the code like FIXME, XXX
312
# * PEP 263: source code with non ascii character but no encoding declaration
316
# List of note tags to take in consideration, separated by a comma.
320
# checks for similarities and duplicated code. This computation may be
321
# memory / CPU intensive, so you should disable it if you experiments some
326
# Minimum lines number of a similarity.
327
min-similarity-lines=4
329
# Ignore comments when computing similarities.
332
# Ignore docstrings when computing similarities.
333
ignore-docstrings=yes
340
# pylint doesn't strip the words, so insert a dummy x at the beginning to make
341
# the other words work properly.
342
# https://bitbucket.org/logilab/pylint/issue/398/spelling-words-need-to-be-stripped-or-the
343
spelling-private-dict-file=doc/dict.txt