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.
25 # Pickle collected data for later comparisons.
28 # List of plugins (as comma separated values of python modules names) to load,
29 # usually to register additional checkers.
35 # Enable the message, report, category or checker with the given id(s). You can
36 # either give multiple identifier separated by comma (,) or put this option
40 # Disable the message, report, category or checker with the given id(s). You
41 # can either give multiple identifier separated by comma (,) or put this option
42 # multiple time (only on the command line, not in the configuration file where
43 # it should appear only once).
44 disable=pointless-except, invalid-name, super-init-not-called, fixme, star-args,
45 too-many-instance-attributes, too-few-public-methods, too-many-arguments,
46 too-many-locals, too-many-public-methods, duplicate-code, bad-whitespace,
47 locally-disabled, locally-enabled
49 # bad-continuation, wrong-import-order
53 # Set the output format. Available formats are text, parseable, colorized, msvs
54 # (visual studio) and html
55 output-format=colorized
56 msg-template='{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}'
58 # Include message's id in output
61 # Put messages in a separate file for each module / package specified on the
62 # command line instead of printing them on stdout. Reports (if any) will be
63 # written in a file name "pylint_global.[txt|html]".
66 # Tells whether to display a full report or only the messages
69 # Python expression which should return a note less than 10 (10 is the highes
70 # note). You have access to the variables errors warning, statement which
71 # respectivly contain the number of errors / warnings messages and the total
72 # number of statements analyzed. This is used by the global evaluation repor
74 evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
76 # Add a comment according to your evaluation note. This is used by the global
77 # evaluation report (R0004).
80 # Enable the report(s) with the given id(s).
83 # Disable the report(s) with the given id(s).
89 # * modules / classes / functions / methods / arguments / variables name
90 # * number of arguments, local variables, branchs, returns and statements in
92 # * required module attributes
93 # * dangerous default values as arguments
94 # * redefinition of function / method / class
95 # * uses of the global statemen
99 # Required attributes for module, separated by a comma
102 # Regular expression which should only match functions or classes name which do
103 # not require a docstring
104 no-docstring-rgx=__.*__
106 # Regular expression which should only match correct module names
107 module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
109 # Regular expression which should only match correct module level names
110 const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
112 # Regular expression which should only match correct class names
113 class-rgx=[A-Z_][a-zA-Z0-9]+$
115 # Regular expression which should only match correct function names
116 function-rgx=[a-z_][a-z0-9]{2,30}$
118 # Regular expression which should only match correct method names
119 method-rgx=[a-z_][a-z0-9]{2,30}$
121 # Regular expression which should only match correct instance attribute names
122 attr-rgx=[a-z_][a-z0-9_]{2,30}$
124 # Regular expression which should only match correct argument names
125 argument-rgx=[a-z_][a-z0-9_]{2,30}$
127 # Regular expression which should only match correct variable names
128 variable-rgx=[a-z_][a-z0-9]{2,30}$
130 # Regular expression which should only match correct list comprehension /
131 # generator expression variable names
132 inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
134 # Good variable names which should always be accepted, separated by a comma
135 good-names=i,j,k,ex,Run,_
137 # Bad variable names which should always be refused, separated by a comma
138 bad-names=foo,bar,baz,toto,tutu,tata
140 # List of builtins function names that should not be used, separated by a comma
141 bad-functions=map,filter,apply,inpu
144 # try to find bugs in the code using type inference
148 # Tells wether missing members accessed in mixin class should be ignored. A
149 # mixin class is detected if its name ends with "mixin" (case insensitive).
150 ignore-mixin-members=yes
152 # List of classes names for which member attributes should not be checked
153 # (useful for classes with attributes dynamicaly set).
154 ignored-classes=SQLObjec
156 # When zope mode is activated, add a predefined set of Zope acquired attributes
157 # to generated-members.
160 # List of members which are set dynamically and missed by pylint inference
161 # system, and so shouldn't trigger E0201 when accessed.
162 generated-members=REQUEST,acl_users,aq_paren
166 # * unused variables / imports
167 # * undefined variables
168 # * redefinition of variable from builtins or from an outer scope
169 # * use of variable before assigmen
173 # Tells wether we should check for unused import in __init__ files.
176 # A regular expression matching names used for dummy variables (i.e. not used).
177 dummy-variables-rgx=_|dummy
179 # List of additional names supposed to be defined in builtins. Remember tha
180 # you should avoid to define new builtins when possible.
185 # * methods without self as first argumen
186 # * overridden methods signature
187 # * access only to existant members via self
188 # * attributes not defined in the __init__ method
189 # * supported interfaces implementation
194 # List of interface methods to ignore, separated by a comma. This is used for
195 # instance to not check methods defines in Zope's Interface base class.
196 ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
198 # List of method names used to declare (i.e. assign) instance attributes.
199 defining-attr-methods=__init__,__new__,setUp,build
202 # checks for sign of poor/misdesign:
203 # * number of methods, attributes, local variables...
204 # * size, complexity of functions, methods
208 # Maximum number of arguments for function / method
211 # Maximum number of locals for function / method body
214 # Maximum number of return / yield for function / method body
217 # Maximum number of branch for function / method body
220 # Maximum number of statements in function / method body
223 # Maximum number of parents for a class (see R0901).
226 # Maximum number of attributes for a class (see R0902).
229 # Minimum number of public methods for a class (see R0903).
232 # Maximum number of public methods for a class (see R0904).
233 max-public-methods=20
237 # * external modules dependencies
238 # * relative / wildcard imports
240 # * uses of deprecated modules
244 # Deprecated modules which should not be used, separated by a comma
245 deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
247 # Create a graph of every (i.e. internal and external) dependencies in the
248 # given file (report R0402 must not be disabled)
251 # Create a graph of external dependencies in the given file (report R0402 mus
255 # Create a graph of internal dependencies in the given file (report R0402 mus
261 # * unauthorized constructions
262 # * strict indentation
264 # * use of <> instead of !=
268 # Maximum number of characters on a single line.
271 # Maximum number of lines in a module
272 # XXX 1500 -> 4000 for miniedit.py
273 max-module-lines=4000
275 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
281 # * warning notes in the code like FIXME, XXX
282 # * PEP 263: source code with non ascii character but no encoding declaration
286 # List of note tags to take in consideration, separated by a comma.
290 # checks for similarities and duplicated code. This computation may be
291 # memory / CPU intensive, so you should disable it if you experiments some
296 # Minimum lines number of a similarity.
297 min-similarity-lines=4
299 # Ignore comments when computing similarities.
302 # Ignore docstrings when computing similarities.
303 ignore-docstrings=yes