Playing with some pylint settings to cut down noise
[gc-dialer] / support / pylint.rc
1 # lint Python modules using external checkers.
2
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
5 # to:
6 # * handle message activation / deactivation at the module level
7 # * handle some basic but necessary stats'data (number of classes, methods...)
8
9 [MASTER]
10
11 # Specify a configuration file.
12 #rcfile=
13
14 # Python code to execute, usually for sys.path manipulation such as
15 # pygtk.require().
16 #init-hook=
17
18 # Profiled execution.
19 profile=no
20
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.
23 ignore=CVS
24
25 # Pickle collected data for later comparisons.
26 persistent=yes
27
28 # Set the cache size for astng objects.
29 cache-size=500
30
31 # List of plugins (as comma separated values of python modules names) to load,
32 # usually to register additional checkers.
33 load-plugins=
34
35
36 [MESSAGES CONTROL]
37
38 # Enable only checker(s) with the given id(s). This option conflicts with the
39 # disable-checker option
40 #enable-checker=
41
42 # Enable all checker(s) except those with the given id(s). This option
43 # conflicts with the enable-checker option
44 #disable-checker=
45
46 # Enable all messages in the listed categories.
47 #enable-msg-cat=
48
49 # Disable all messages in the listed categories.
50 #disable-msg-cat=
51
52 # Enable the message(s) with the given id(s).
53 #enable-msg=
54
55 # Disable the message(s) with the given id(s).
56 #Unused Arg, Missing Docstring
57 disable-msg=W0613,C0111
58
59
60 [REPORTS]
61
62 # set the output format. Available formats are text, parseable, colorized, msvs
63 # (visual studio) and html
64 output-format=text
65
66 # Include message's id in output
67 include-ids=no
68
69 # Put messages in a separate file for each module / package specified on the
70 # command line instead of printing them on stdout. Reports (if any) will be
71 # written in a file name "pylint_global.[txt|html]".
72 files-output=no
73
74 # Tells wether to display a full report or only the messages
75 reports=yes
76
77 # Python expression which should return a note less than 10 (10 is the highest
78 # note).You have access to the variables errors warning, statement which
79 # respectivly contain the number of errors / warnings messages and the total
80 # number of statements analyzed. This is used by the global evaluation report
81 # (R0004).
82 evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
83
84 # Add a comment according to your evaluation note. This is used by the global
85 # evaluation report (R0004).
86 comment=no
87
88 # Enable the report(s) with the given id(s).
89 #enable-report=
90
91 # Disable the report(s) with the given id(s).
92 #disable-report=
93
94
95 # checks for
96 # * unused variables / imports
97 # * undefined variables
98 # * redefinition of variable from builtins or from an outer scope
99 # * use of variable before assigment
100
101 [VARIABLES]
102
103 # Tells wether we should check for unused import in __init__ files.
104 init-import=no
105
106 # A regular expression matching names used for dummy variables (i.e. not used).
107 dummy-variables-rgx=_|dummy
108
109 # List of additional names supposed to be defined in builtins. Remember that
110 # you should avoid to define new builtins when possible.
111 additional-builtins=
112
113
114 # checks for :
115 # * doc strings
116 # * modules / classes / functions / methods / arguments / variables name
117 # * number of arguments, local variables, branchs, returns and statements in
118 # functions, methods
119 # * required module attributes
120 # * dangerous default values as arguments
121 # * redefinition of function / method / class
122 # * uses of the global statement
123
124 [BASIC]
125
126 # Required attributes for module, separated by a comma
127 required-attributes=
128
129 # Regular expression which should only match functions or classes name which do
130 # not require a docstring
131 no-docstring-rgx=__.*__
132
133 # Regular expression which should only match correct module names
134 module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
135
136 # Regular expression which should only match correct module level names
137 const-rgx=(([A-Z_][A-Z1-9_]*)|(__.*__))$
138
139 # Regular expression which should only match correct class names
140 class-rgx=[A-Z_][a-zA-Z0-9]+$
141
142 # Regular expression which should only match correct function names
143 function-rgx=[a-z_][a-z0-9_]{2,30}$
144
145 # Regular expression which should only match correct method names
146 method-rgx=[a-z_][a-z0-9_]{2,30}$
147
148 # Regular expression which should only match correct instance attribute names
149 attr-rgx=[a-z_][a-zA-Z0-9_]{2,30}$
150
151 # Regular expression which should only match correct argument names
152 argument-rgx=[a-z_][a-zA-Z0-9_]{2,30}$
153
154 # Regular expression which should only match correct variable names
155 variable-rgx=[a-z_][a-zA-Z0-9_]{2,30}$
156
157 # Regular expression which should only match correct list comprehension /
158 # generator expression variable names
159 inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
160
161 # Good variable names which should always be accepted, separated by a comma
162 good-names=i,j,k,ex,Run,_
163
164 # Bad variable names which should always be refused, separated by a comma
165 bad-names=foo,bar,baz,toto,tutu,tata
166
167 # List of builtins function names that should not be used, separated by a comma
168 bad-functions=map,filter,apply,input
169
170
171 # try to find bugs in the code using type inference
172
173 [TYPECHECK]
174
175 # Tells wether missing members accessed in mixin class should be ignored. A
176 # mixin class is detected if its name ends with "mixin" (case insensitive).
177 ignore-mixin-members=yes
178
179 # When zope mode is activated, consider the acquired-members option to ignore
180 # access to some undefined attributes.
181 zope=no
182
183 # List of members which are usually get through zope's acquisition mecanism and
184 # so shouldn't trigger E0201 when accessed (need zope=yes to be considered).
185 acquired-members=REQUEST,acl_users,aq_parent
186
187
188 # checks for sign of poor/misdesign:
189 # * number of methods, attributes, local variables...
190 # * size, complexity of functions, methods
191
192 [DESIGN]
193
194 # Maximum number of arguments for function / method
195 max-args=5
196
197 # Maximum number of locals for function / method body
198 max-locals=15
199
200 # Maximum number of return / yield for function / method body
201 max-returns=6
202
203 # Maximum number of branch for function / method body
204 max-branchs=12
205
206 # Maximum number of statements in function / method body
207 max-statements=50
208
209 # Maximum number of parents for a class (see R0901).
210 max-parents=7
211
212 # Maximum number of attributes for a class (see R0902).
213 max-attributes=7
214
215 # Minimum number of public methods for a class (see R0903).
216 min-public-methods=1
217
218 # Maximum number of public methods for a class (see R0904).
219 max-public-methods=20
220
221
222 # checks for :
223 # * methods without self as first argument
224 # * overridden methods signature
225 # * access only to existant members via self
226 # * attributes not defined in the __init__ method
227 # * supported interfaces implementation
228 # * unreachable code
229
230 [CLASSES]
231
232 # List of interface methods to ignore, separated by a comma. This is used for
233 # instance to not check methods defines in Zope's Interface base class.
234 ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
235
236 # List of method names used to declare (i.e. assign) instance attributes.
237 defining-attr-methods=__init__,__new__,setUp
238
239
240 # checks for
241 # * external modules dependencies
242 # * relative / wildcard imports
243 # * cyclic imports
244 # * uses of deprecated modules
245
246 [IMPORTS]
247
248 # Deprecated modules which should not be used, separated by a comma
249 deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
250
251 # Create a graph of every (i.e. internal and external) dependencies in the
252 # given file (report R0402 must not be disabled)
253 import-graph=
254
255 # Create a graph of external dependencies in the given file (report R0402 must
256 # not be disabled)
257 ext-import-graph=
258
259 # Create a graph of internal dependencies in the given file (report R0402 must
260 # not be disabled)
261 int-import-graph=
262
263
264 # checks for similarities and duplicated code. This computation may be
265 # memory / CPU intensive, so you should disable it if you experiments some
266 # problems.
267
268 [SIMILARITIES]
269
270 # Minimum lines number of a similarity.
271 min-similarity-lines=4
272
273 # Ignore comments when computing similarities.
274 ignore-comments=yes
275
276 # Ignore docstrings when computing similarities.
277 ignore-docstrings=yes
278
279
280 # checks for:
281 # * warning notes in the code like FIXME, XXX
282 # * PEP 263: source code with non ascii character but no encoding declaration
283
284 [MISCELLANEOUS]
285
286 # List of note tags to take in consideration, separated by a comma.
287 notes=FIXME,XXX,TODO
288
289
290 # checks for :
291 # * unauthorized constructions
292 # * strict indentation
293 # * line length
294 # * use of <> instead of !=
295
296 [FORMAT]
297
298 # Maximum number of characters on a single line.
299 max-line-length=80
300
301 # Maximum number of lines in a module
302 max-module-lines=1000
303
304 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
305 # tab).
306 indent-string='\t'