Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6ff64ad

Browse files
committed
add pylint rc file
1 parent 61d0227 commit 6ff64ad

1 file changed

Lines changed: 303 additions & 0 deletions

File tree

pylintrc

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

0 commit comments

Comments
 (0)