~ubuntu-branches/ubuntu/utopic/bauble/utopic

« back to all changes in this revision

Viewing changes to .pylintrc

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2009-07-27 10:40:53 UTC
  • mfrom: (3.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090727104053-n5ieslixn3my8fa3
Tags: 0.9.2-1ubuntu1
* Merge from debian unstable, Ubuntu remaining changes:
  - Take python stuffs from /usr/local to install them into /usr, otherwise
    it FTBFS.

Show diffs side-by-side

added added

removed removed

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