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...)
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.
23 # Pickle collected data for later comparisons.
26 # Set the cache size for astng objects.
29 # List of plugins (as comma separated values of python modules names) to load,
30 # usually to register additional checkers.
36 # Display a help message for the given message id and exit. The value may be a
37 # comma separated list of message ids.
43 # Enable only checker(s) with the given id(s). This option conflict with the
44 # disable-checker option
47 # Enable all checker(s) except those with the given id(s). This option conflict
48 # with the disable-checker option
51 # Enable all messages in the listed categories.
54 # Disable all messages in the listed categories.
57 # Enable the message(s) with the given id(s).
60 # Disable the message(s) with the given id(s).
66 # set the output format. Available formats are text, parseable, colorized and
70 # Include message's id in output
73 # Put messages in a separate file for each module / package specified on the
74 # command line instead of printing them on stdout. Reports (if any) will be
75 # written in a file name "pylint_global.[txt|html]".
78 # Tells wether to display a full report or only the messages
81 # Python expression which should return a note less than 10 (10 is the highest
82 # note).You have access to the variables errors warning, statement which
83 # respectivly contain the number of errors / warnings messages and the total
84 # number of statements analyzed. This is used by the global evaluation report
86 evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
88 # Add a comment according to your evaluation note. This is used by the global
89 # evaluation report (R0004).
92 # Enable the report(s) with the given id(s).
95 # Disable the report(s) with the given id(s).
101 # * modules / classes / functions / methods / arguments / variables name
102 # * number of arguments, local variables, branchs, returns and statements in
104 # * required module attributes
105 # * dangerous default values as arguments
106 # * redefinition of function / method / class
107 # * uses of the global statement
111 # Required attributes for module, separated by a comma
114 # Regular expression which should only match functions or classes name which do
115 # not require a docstring
116 no-docstring-rgx=__.*__
118 # Regular expression which should only match correct module names
119 module-rgx=(([a-z_][a-z0-9_-]*)|([A-Z][a-zA-Z0-9]+))$
121 # Regular expression which should only match correct module level names
122 const-rgx=(([A-Z_][A-Z1-9_]*)|(__.*__))$
124 # Regular expression which should only match correct class names
125 class-rgx=[A-Z_][a-zA-Z0-9]+$
127 # Regular expression which should only match correct function names
128 function-rgx=[A-Za-z_][A-Za-z0-9_]{2,30}$
130 # Regular expression which should only match correct method names
131 method-rgx=[A-Za-z_][A-Za-z0-9_]{2,30}$
133 # Regular expression which should only match correct instance attribute names
134 attr-rgx=[a-z_][a-z0-9_]{2,30}$
136 # Regular expression which should only match correct argument names
137 argument-rgx=[a-z_][a-z0-9_]{2,30}$
139 # Regular expression which should only match correct variable names
140 variable-rgx=[a-z_][a-z0-9_]{2,30}$
142 # Regular expression which should only match correct list comprehension /
143 # generator expression variable names
144 inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
146 # Good variable names which should always be accepted, separated by a comma
147 good-names=i,j,k,f,ex,Run,_
149 # Bad variable names which should always be refused, separated by a comma
150 bad-names=foo,bar,baz,toto,tutu,tata
152 # List of builtins function names that should not be used, separated by a comma
153 bad-functions=map,filter,apply,input
157 # * unused variables / imports
158 # * undefined variables
159 # * redefinition of variable from builtins or from an outer scope
160 # * use of variable before assigment
164 # Tells wether we should check for unused import in __init__ files.
167 # A regular expression matching names used for dummy variables (i.e. not used).
168 dummy-variables-rgx=_|dummy|event|evt|busy
170 # List of additional names supposed to be defined in builtins. Remember that
171 # you should avoid to define new builtins when possible.
172 additional-builtins=_
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 # When zope mode is activated, consider the acquired-members option to ignore
184 # access to some undefined attributes.
187 # List of members which are usually get through zope's acquisition mecanism and
188 # so shouldn't trigger E0201 when accessed (need zope=yes to be considered).
189 acquired-members=REQUEST,acl_users,aq_parent
193 # * methods without self as first argument
194 # * overridden methods signature
195 # * access only to existant members via self
196 # * attributes not defined in the __init__ method
197 # * supported interfaces implementation
202 # List of interface methods to ignore, separated by a comma. This is used for
203 # instance to not check methods defines in Zope's Interface base class.
204 ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
206 # List of method names used to declare (i.e. assign) instance attributes.
207 defining-attr-methods=__init__,__new__,setUp
210 # checks for sign of poor/misdesign:
211 # * number of methods, attributes, local variables...
212 # * size, complexity of functions, methods
216 # Maximum number of arguments for function / method
219 # Maximum number of locals for function / method body
222 # Maximum number of return / yield for function / method body
225 # Maximum number of branch for function / method body
228 # Maximum number of statements in function / method body
231 # Maximum number of parents for a class (see R0901).
234 # Maximum number of attributes for a class (see R0902).
237 # Minimum number of public methods for a class (see R0903).
240 # Maximum number of public methods for a class (see R0904).
241 max-public-methods=20
245 # * external modules dependencies
246 # * relative / wildcard imports
248 # * uses of deprecated modules
252 # Deprecated modules which should not be used, separated by a comma
253 deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
255 # Create a graph of every (i.e. internal and external) dependencies in the
256 # given file (report R0402 must not be disabled)
259 # Create a graph of external dependencies in the given file (report R0402 must
263 # Create a graph of internal dependencies in the given file (report R0402 must
268 # checks for similarities and duplicated code. This computation may be
269 # memory / CPU intensive, so you should disable it if you experiments some
274 # Minimum lines number of a similarity.
275 min-similarity-lines=4
277 # Ignore comments when computing similarities.
280 # Ignore docstrings when computing similarities.
281 ignore-docstrings=yes
285 # * warning notes in the code like FIXME, XXX
286 # * PEP 263: source code with non ascii character but no encoding declaration
290 # List of note tags to take in consideration, separated by a comma.
291 notes=FIXME,XXX,TODO,@todo,\todo
295 # * unauthorized constructions
296 # * strict indentation
298 # * use of <> instead of !=
302 # Maximum number of characters on a single line.
305 # Maximum number of lines in a module
306 max-module-lines=1000
308 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1