source: sasview/build_tools/pylint.rc @ aa720c4

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change on this file since aa720c4 was 3c3a440, checked in by Doucet, Mathieu <doucetm@…>, 10 years ago

pylint fixes

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