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...)
11 # Specify a configuration file.
17 # Add <file or directory> to the black list. It should be a base name, not a
18 # path. You may set this option multiple times.
21 # Pickle collected data for later comparisons.
24 # Set the cache size for astng objects.
27 # List of plugins (as comma separated values of python modules names) to load,
28 # usually to register additional checkers.
34 # Display a help message for the given message id and exit. The value may be a
35 # comma separated list of message ids.
41 # Enable only checker(s) with the given id(s). This option conflict with the
42 # disable-checker option
45 # Enable all checker(s) except those with the given id(s). This option conflict
46 # with the disable-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).
58 # Disable the message(s) with the given id(s).
59 disable-msg=C0103,F0401,E0611,R0903,W0232,W0102,E1002,R0913,R0904
63 # set the output format. Available formats are text, parseable, colorized and
67 # Include message's id in output
70 # Put messages in a separate file for each module / package specified on the
71 # command line instead of printing them on stdout. Reports (if any) will be
72 # written in a file name "pylint_global.[txt|html]".
75 # Tells wether to display a full report or only the messages
78 # Python expression which should return a note less than 10 (10 is the highest
79 # note).You have access to the variables errors warning, statement which
80 # respectivly contain the number of errors / warnings messages and the total
81 # number of statements analyzed. This is used by the global evaluation report
83 evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
85 # Add a comment according to your evaluation note. This is used by the global
86 # evaluation report (R0004).
89 # Enable the report(s) with the given id(s).
92 # Disable the report(s) with the given id(s).
97 # * unused variables / imports
98 # * undefined variables
99 # * redefinition of variable from builtins or from an outer scope
100 # * use of variable before assigment
104 # Tells wether we should check for unused import in __init__ files.
107 # A regular expression matching names used for dummy variables (i.e. not used).
108 dummy-variables-rgx=_|dummy
110 # List of additional names supposed to be defined in builtins. Remember that
111 # you should avoid to define new builtins when possible.
115 # try to find bugs in the code using type inference
119 # Tells wether missing members accessed in mixin class should be ignored. A
120 # mixin class is detected if its name ends with "mixin" (case insensitive).
121 ignore-mixin-members=yes
123 # When zope mode is activated, consider the acquired-members option to ignore
124 # access to some undefined attributes.
127 # List of members which are usually get through zope's acquisition mecanism and
128 # so shouldn't trigger E0201 when accessed (need zope=yes to be considered).
129 acquired-members=REQUEST,acl_users,aq_parent
134 # * modules / classes / functions / methods / arguments / variables name
135 # * number of arguments, local variables, branchs, returns and statements in
137 # * required module attributes
138 # * dangerous default values as arguments
139 # * redefinition of function / method / class
140 # * uses of the global statement
144 # Required attributes for module, separated by a comma
147 # Regular expression which should only match functions or classes name which do
148 # not require a docstring
149 no-docstring-rgx=__.*__
151 # Regular expression which should only match correct module names
152 module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
154 # Regular expression which should only match correct module level names
155 const-rgx=(([A-Z_][A-Z1-9_]*)|(__.*__))$
157 # Regular expression which should only match correct class names
158 class-rgx=[A-Z_][a-zA-Z0-9]+$
160 # Regular expression which should only match correct function names
161 function-rgx=[a-z_][a-z0-9_]{2,30}$
163 # Regular expression which should only match correct method names
164 method-rgx=[a-z_][a-z0-9_]{2,30}$
166 # Regular expression which should only match correct instance attribute names
167 attr-rgx=[a-z_][a-z0-9_]{2,30}$
169 # Regular expression which should only match correct argument names
170 argument-rgx=[a-z_][a-z0-9_]{2,30}$
172 # Regular expression which should only match correct variable names
173 variable-rgx=[a-z_][a-z0-9_]{2,30}$
175 # Regular expression which should only match correct list comprehension /
176 # generator expression variable names
177 inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
179 # Good variable names which should always be accepted, separated by a comma
180 good-names=i,j,k,ex,Run,_
182 # Bad variable names which should always be refused, separated by a comma
183 bad-names=foo,bar,baz,toto,tutu,tata
185 # List of builtins function names that should not be used, separated by a comma
186 bad-functions=map,filter,apply,input
190 # * external modules dependencies
191 # * relative / wildcard imports
193 # * uses of deprecated modules
197 # Deprecated modules which should not be used, separated by a comma
198 deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
200 # Create a graph of every (i.e. internal and external) dependencies in the
201 # given file (report R0402 must not be disabled)
204 # Create a graph of external dependencies in the given file (report R0402 must
208 # Create a graph of internal dependencies in the given file (report R0402 must
214 # * methods without self as first argument
215 # * overridden methods signature
216 # * access only to existant members via self
217 # * attributes not defined in the __init__ method
218 # * supported interfaces implementation
223 # List of interface methods to ignore, separated by a comma. This is used for
224 # instance to not check methods defines in Zope's Interface base class.
225 ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
227 # List of method names used to declare (i.e. assign) instance attributes.
228 defining-attr-methods=__init__,__new__,setUp
231 # checks for sign of poor/misdesign:
232 # * number of methods, attributes, local variables...
233 # * size, complexity of functions, methods
237 # Maximum number of arguments for function / method
240 # Maximum number of locals for function / method body
243 # Maximum number of return / yield for function / method body
246 # Maximum number of branch for function / method body
249 # Maximum number of statements in function / method body
252 # Maximum number of parents for a class (see R0901).
255 # Maximum number of attributes for a class (see R0902).
258 # Minimum number of public methods for a class (see R0903).
261 # Maximum number of public methods for a class (see R0904).
262 max-public-methods=20
266 # * unauthorized constructions
267 # * strict indentation
269 # * use of <> instead of !=
273 # Maximum number of characters on a single line.
276 # Maximum number of lines in a module
277 max-module-lines=1000
279 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
285 # checks for similarities and duplicated code. This computation may be
286 # memory / CPU intensive, so you should disable it if you experiments some
291 # Minimum lines number of a similarity.
292 min-similarity-lines=4
294 # Ignore comments when computing similarities.
297 # Ignore docstrings when computing similarities.
298 ignore-docstrings=yes
302 # * warning notes in the code like FIXME, XXX
303 # * PEP 263: source code with non ascii character but no encoding declaration
307 # List of note tags to take in consideration, separated by a comma.