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.
14 # Python code to execute, usually for sys.path manipulation such as
21 # Add <file or directory> to the black list. It should be a base name, not a
22 # path. You may set this option multiple times.
26 # Pickle collected data for later comparisons.
29 # Set the cache size for astng objects.
32 # List of plugins (as comma separated values of python modules names) to load,
33 # usually to register additional checkers.
39 # Enable only checker(s) with the given id(s). This option conflicts with the
40 # disable-checker option
43 # Enable all checker(s) except those with the given id(s). This option
44 # conflicts with the enable-checker option
47 # Enable all messages in the listed categories (IRCWEF).
50 # Disable all messages in the listed categories (IRCWEF).
53 # Enable the message(s) with the given id(s).
56 # Disable the message(s) with the given id(s).
57 # :W0704: *Except doesn't do anything*
58 # :W0231: *__init__ method from base class %r is not called*
59 # :R0903: *Too few public methods (%s/%s)*
60 disable-msg=W0704,W0231,R0903
65 # Set the output format. Available formats are text, parseable, colorized, msvs
66 # (visual studio) and html
67 output-format=colorized
69 # Include message's id in output
72 # Put messages in a separate file for each module / package specified on the
73 # command line instead of printing them on stdout. Reports (if any) will be
74 # written in a file name "pylint_global.[txt|html]".
77 # Tells wether to display a full report or only the messages
80 # Python expression which should return a note less than 10 (10 is the highest
81 # note). You have access to the variables errors warning, statement which
82 # respectively contain the number of errors / warnings messages and the total
83 # number of statements analyzed. This is used by the global evaluation report
85 evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
87 # Add a comment according to your evaluation note. This is used by the global
88 # evaluation report (R0004).
91 # Enable the report(s) with the given id(s).
94 # Disable the report(s) with the given id(s).
99 # * unused variables / imports
100 # * undefined variables
101 # * redefinition of variable from builtins or from an outer scope
102 # * use of variable before assignment
106 # Tells whether we should check for unused import in __init__ files.
109 # A regular expression matching names used for dummy variables (i.e. not used).
110 dummy-variables-rgx=_|dummy
112 # List of additional names supposed to be defined in builtins. Remember that
113 # you should avoid to define new builtins when possible.
119 # * modules / classes / functions / methods / arguments / variables name
120 # * number of arguments, local variables, branches, returns and statements in
122 # * required module attributes
123 # * dangerous default values as arguments
124 # * redefinition of function / method / class
125 # * uses of the global statement
129 # Required attributes for module, separated by a comma
132 # Regular expression which should only match functions or classes name which do
133 # not require a docstring
134 # was no-docstring-rgx=__.*__
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}$
152 # Regular expression which should only match correct instance attribute names
153 # was attr-rgx=[a-z_][a-z0-9_]{2,30}$
154 attr-rgx=[a-z_][a-z0-9_]{1,30}$
156 # Regular expression which should only match correct argument names
157 # was argument-rgx=[a-z_][a-z0-9_]{2,30}$
158 argument-rgx=[a-z_][a-z0-9_]{1,30}$
160 # Regular expression which should only match correct variable names
161 # was variable-rgx=[a-z_][a-z0-9_]{2,30}$
162 variable-rgx=[a-z_][a-z0-9_]{1,30}$
164 # Regular expression which should only match correct list comprehension /
165 # generator expression variable names
166 inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
168 # Good variable names which should always be accepted, separated by a comma
169 good-names=i,j,k,ex,Run,_
171 # Bad variable names which should always be refused, separated by a comma
172 bad-names=foo,bar,baz,toto,tutu,tata
174 # List of builtins function names that should not be used, separated by a comma
175 bad-functions=map,filter,apply,input
178 # try to find bugs in the code using type inference
182 # Tells whether missing members accessed in mixin class should be ignored. A
183 # mixin class is detected if its name ends with "mixin" (case insensitive).
184 ignore-mixin-members=yes
186 # List of classes names for which member attributes should not be checked
187 # (useful for classes with attributes dynamically set).
188 ignored-classes=SQLObject
190 # When zope mode is activated, add a predefined set of Zope acquired attributes
191 # to generated-members.
194 # List of members which are set dynamically and missed by pylint inference
195 # system, and so shouldn't trigger E0201 when accessed.
196 generated-members=REQUEST,acl_users,aq_parent
200 # * external modules dependencies
201 # * relative / wildcard imports
203 # * uses of deprecated modules
207 # Deprecated modules which should not be used, separated by a comma
208 deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
210 # Create a graph of every (i.e. internal and external) dependencies in the
211 # given file (report R0402 must not be disabled)
214 # Create a graph of external dependencies in the given file (report R0402 must
218 # Create a graph of internal dependencies in the given file (report R0402 must
224 # * methods without self as first argument
225 # * overridden methods signature
226 # * access only to existent members via self
227 # * attributes not defined in the __init__ method
228 # * supported interfaces implementation
233 # List of interface methods to ignore, separated by a comma. This is used for
234 # instance to not check methods defines in Zope's Interface base class.
235 ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
237 # List of method names used to declare (i.e. assign) instance attributes.
238 defining-attr-methods=__init__,__new__,setUp
241 # checks for sign of poor/misdesign:
242 # * number of methods, attributes, local variables...
243 # * size, complexity of functions, methods
247 # Maximum number of arguments for function / method
251 # Maximum number of locals for function / method body
254 # Maximum number of return / yield for function / method body
258 # Maximum number of branch for function / method body
261 # Maximum number of statements in function / method body
264 # Maximum number of parents for a class (see R0901).
267 # Maximum number of attributes for a class (see R0902).
268 # was max-attributes=7
271 # Minimum number of public methods for a class (see R0903).
274 # Maximum number of public methods for a class (see R0904).
275 max-public-methods=20
279 # * warning notes in the code like FIXME, XXX
280 # * PEP 263: source code with non ascii character but no encoding declaration
284 # List of note tags to take in consideration, separated by a comma.
288 # checks for similarities and duplicated code. This computation may be
289 # memory / CPU intensive, so you should disable it if you experiments some
294 # Minimum lines number of a similarity.
295 min-similarity-lines=4
297 # Ignore comments when computing similarities.
300 # Ignore docstrings when computing similarities.
301 ignore-docstrings=yes
305 # * unauthorized constructions
306 # * strict indentation
308 # * use of <> instead of !=
312 # Maximum number of characters on a single line.
315 # Maximum number of lines in a module
316 max-module-lines=1000
318 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1