Skip to content

Commit 3d52280

Browse files
committed
add pylintrc
1 parent 30a7c43 commit 3d52280

File tree

1 file changed

+283
-0
lines changed

1 file changed

+283
-0
lines changed

pylintrc

+283
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,283 @@
1+
[MASTER]
2+
3+
# see pylint --list-msgs to find IDs
4+
5+
# Specify a configuration file.
6+
#rcfile=
7+
8+
# Python code to execute, usually for sys.path manipulation such as
9+
# pygtk.require().
10+
#init-hook=
11+
12+
# Profiled execution.
13+
profile=no
14+
15+
# Add files or directories to the blacklist. They should be base names, not
16+
# paths.
17+
ignore=CVS
18+
19+
# Pickle collected data for later comparisons.
20+
persistent=yes
21+
22+
# List of plugins (as comma separated values of python modules names) to load,
23+
# usually to register additional checkers.
24+
load-plugins=
25+
26+
# A comma-separated list of package or module names from where C extensions may
27+
# be loaded. Extensions are loading into the active Python interpreter and may
28+
# run arbitrary code
29+
extension-pkg-whitelist=numpy
30+
31+
32+
[MESSAGES CONTROL]
33+
34+
# Enable the message, report, category or checker with the given id(s). You can
35+
# either give multiple identifier separated by comma (,) or put this option
36+
# multiple time. See also the "--disable" option for examples.
37+
#enable=
38+
# https://medium.com/@acboulder/type-hints-are-scary-f52d07a36a31#.81j60taq0
39+
enable=bad-indentation,mixed-indentation,unnecessary-semicolon,superfluous-parens
40+
41+
# Disable the message, report, category or checker with the given id(s). You
42+
# can either give multiple identifiers separated by comma (,) or put this
43+
# option multiple times (only on the command line, not in the configuration
44+
# file where it should appear only once).You can also use "--disable=all" to
45+
# disable everything first and then reenable specific checks. For example, if
46+
# you want to run only the similarities checker, you can use "--disable=all
47+
# --enable=similarities". If you want to run only the classes checker, but have
48+
# no Warning level messages displayed, use"--disable=all --enable=classes
49+
# --disable=W"
50+
#disable=
51+
# https://medium.com/@acboulder/type-hints-are-scary-f52d07a36a31#.81j60taq0
52+
#unidiomatic-typecheck doesn't exist? (different pylint version?)
53+
disable=format,design,similarities,cyclic-import,import-error,broad-except,no-self-use,no-name-in-module,invalid-name,abstract-method,star-args,import-self,no-init,len-as-condition,locally-disabled
54+
55+
[REPORTS]
56+
57+
# Set the output format. Available formats are text, parseable, colorized, msvs
58+
# (visual studio) and html. You can also give a reporter class, eg
59+
# mypackage.mymodule.MyReporterClass.
60+
output-format=text
61+
62+
# Include message's id in output
63+
include-ids=no
64+
65+
# Include symbolic ids of messages in output
66+
symbols=no
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]".
71+
files-output=no
72+
73+
# Tells whether to display a full report or only the messages
74+
reports=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+
# (RP0004).
81+
evaluation=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 (RP0004).
85+
comment=no
86+
87+
88+
[FORMAT]
89+
90+
# Maximum number of characters on a single line.
91+
max-line-length=80
92+
93+
# Maximum number of lines in a module
94+
max-module-lines=1000
95+
96+
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
97+
# tab).
98+
indent-string=' '
99+
100+
# Regexp for a line that is allowed to be longer than the limit.
101+
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
102+
103+
[BASIC]
104+
105+
# Required attributes for module, separated by a comma
106+
required-attributes=
107+
108+
# List of builtins function names that should not be used, separated by a comma
109+
bad-functions=map,filter,apply,input
110+
111+
# Regular expression which should only match correct module names
112+
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
113+
114+
# Regular expression which should only match correct module level names
115+
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
116+
117+
# Regular expression which should only match correct class names
118+
class-rgx=[A-Z_][a-zA-Z0-9]+$
119+
120+
# Regular expression which should only match correct function names
121+
function-rgx=[a-z_][a-z0-9_]{2,30}$
122+
123+
# Regular expression which should only match correct method names
124+
method-rgx=[a-z_][a-z0-9_]{2,30}$
125+
126+
# Regular expression which should only match correct instance attribute names
127+
attr-rgx=[a-z_][a-z0-9_]{2,30}$
128+
129+
# Regular expression which should only match correct argument names
130+
argument-rgx=[a-z_][a-z0-9_]{2,30}$
131+
132+
# Regular expression which should only match correct variable names
133+
variable-rgx=[a-z_][a-z0-9_]{2,30}$
134+
135+
# Regular expression which should only match correct list comprehension /
136+
# generator expression variable names
137+
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
138+
139+
# Good variable names which should always be accepted, separated by a comma
140+
good-names=i,j,k,ex,Run,_
141+
142+
# Bad variable names which should always be refused, separated by a comma
143+
bad-names=foo,bar,baz,toto,tutu,tata
144+
145+
# Regular expression which should only match functions or classes name which do
146+
# not require a docstring
147+
no-docstring-rgx=__.*__
148+
149+
150+
[SIMILARITIES]
151+
152+
# Minimum lines number of a similarity.
153+
min-similarity-lines=4
154+
155+
# Ignore comments when computing similarities.
156+
ignore-comments=yes
157+
158+
# Ignore docstrings when computing similarities.
159+
ignore-docstrings=yes
160+
161+
# Ignore imports when computing similarities.
162+
ignore-imports=no
163+
164+
165+
[MISCELLANEOUS]
166+
167+
# List of note tags to take in consideration, separated by a comma.
168+
notes=FIXME,XXX,TODO
169+
170+
171+
[TYPECHECK]
172+
173+
# Tells whether missing members accessed in mixin class should be ignored. A
174+
# mixin class is detected if its name ends with "mixin" (case insensitive).
175+
ignore-mixin-members=yes
176+
177+
# List of classes names for which member attributes should not be checked
178+
# (useful for classes with attributes dynamically set). This supports can work
179+
# with qualified names.
180+
ignored-classes=SQLObject,numpy
181+
182+
# List of module names for which member attributes should not be checked
183+
# (useful for modules/projects where namespaces are manipulated during runtime
184+
# and thus existing member attributes cannot be deduced by static analysis. It
185+
# supports qualified module names, as well as Unix pattern matching.
186+
ignored-modules=numpy,scipy.spatial
187+
188+
# When zope mode is activated, add a predefined set of Zope acquired attributes
189+
# to generated-members.
190+
zope=no
191+
192+
# List of members which are set dynamically and missed by pylint inference
193+
# system, and so shouldn't trigger E0201 when accessed. Python regular
194+
# expressions are accepted.
195+
generated-members=REQUEST,acl_users,aq_parent
196+
197+
[VARIABLES]
198+
199+
# Tells whether we should check for unused import in __init__ files.
200+
init-import=no
201+
202+
# A regular expression matching the beginning of the name of dummy variables
203+
# (i.e. not used).
204+
dummy-variables-rgx=_|dummy
205+
206+
# List of additional names supposed to be defined in builtins. Remember that
207+
# you should avoid to define new builtins when possible.
208+
additional-builtins=
209+
210+
211+
[IMPORTS]
212+
213+
# Deprecated modules which should not be used, separated by a comma
214+
deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
215+
216+
# Create a graph of every (i.e. internal and external) dependencies in the
217+
# given file (report RP0402 must not be disabled)
218+
import-graph=
219+
220+
# Create a graph of external dependencies in the given file (report RP0402 must
221+
# not be disabled)
222+
ext-import-graph=
223+
224+
# Create a graph of internal dependencies in the given file (report RP0402 must
225+
# not be disabled)
226+
int-import-graph=
227+
228+
229+
[DESIGN]
230+
231+
# Maximum number of arguments for function / method
232+
max-args=5
233+
234+
# Argument names that match this expression will be ignored. Default to name
235+
# with leading underscore
236+
ignored-argument-names=_.*
237+
238+
# Maximum number of locals for function / method body
239+
max-locals=15
240+
241+
# Maximum number of return / yield for function / method body
242+
max-returns=6
243+
244+
# Maximum number of branch for function / method body
245+
max-branchs=12
246+
247+
# Maximum number of statements in function / method body
248+
max-statements=50
249+
250+
# Maximum number of parents for a class (see R0901).
251+
max-parents=7
252+
253+
# Maximum number of attributes for a class (see R0902).
254+
max-attributes=7
255+
256+
# Minimum number of public methods for a class (see R0903).
257+
min-public-methods=2
258+
259+
# Maximum number of public methods for a class (see R0904).
260+
max-public-methods=20
261+
262+
263+
[CLASSES]
264+
265+
# List of interface methods to ignore, separated by a comma. This is used for
266+
# instance to not check methods defines in Zope's Interface base class.
267+
ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
268+
269+
# List of method names used to declare (i.e. assign) instance attributes.
270+
defining-attr-methods=__init__,__new__,setUp
271+
272+
# List of valid names for the first argument in a class method.
273+
valid-classmethod-first-arg=cls
274+
275+
# List of valid names for the first argument in a metaclass class method.
276+
valid-metaclass-classmethod-first-arg=mcs
277+
278+
279+
[EXCEPTIONS]
280+
281+
# Exceptions that will emit a warning when being caught. Defaults to
282+
# "Exception"
283+
overgeneral-exceptions=Exception

0 commit comments

Comments
 (0)