Skip to content

Commit 26be547

Browse files
moreatiLudovicRousseau
authored andcommitted
Add default pylint config
1 parent e58fe55 commit 26be547

File tree

1 file changed

+390
-0
lines changed

1 file changed

+390
-0
lines changed

.pylintrc

+390
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,390 @@
1+
[MASTER]
2+
3+
# Specify a configuration file.
4+
#rcfile=
5+
6+
# Python code to execute, usually for sys.path manipulation such as
7+
# pygtk.require().
8+
#init-hook=
9+
10+
# Profiled execution.
11+
profile=no
12+
13+
# Add files or directories to the blacklist. They should be base names, not
14+
# paths.
15+
ignore=CVS
16+
17+
# Pickle collected data for later comparisons.
18+
persistent=yes
19+
20+
# List of plugins (as comma separated values of python modules names) to load,
21+
# usually to register additional checkers.
22+
load-plugins=
23+
24+
# Deprecated. It was used to include message's id in output. Use --msg-template
25+
# instead.
26+
include-ids=no
27+
28+
# Deprecated. It was used to include symbolic ids of messages in output. Use
29+
# --msg-template instead.
30+
symbols=no
31+
32+
# Use multiple processes to speed up Pylint.
33+
jobs=1
34+
35+
# Allow loading of arbitrary C extensions. Extensions are imported into the
36+
# active Python interpreter and may run arbitrary code.
37+
unsafe-load-any-extension=no
38+
39+
# A comma-separated list of package or module names from where C extensions may
40+
# be loaded. Extensions are loading into the active Python interpreter and may
41+
# run arbitrary code
42+
extension-pkg-whitelist=
43+
44+
# Allow optimization of some AST trees. This will activate a peephole AST
45+
# optimizer, which will apply various small optimizations. For instance, it can
46+
# be used to obtain the result of joining multiple strings with the addition
47+
# operator. Joining a lot of strings can lead to a maximum recursion error in
48+
# Pylint and this flag can prevent that. It has one side effect, the resulting
49+
# AST will be different than the one from reality.
50+
optimize-ast=no
51+
52+
53+
[MESSAGES CONTROL]
54+
55+
# Only show warnings with the listed confidence levels. Leave empty to show
56+
# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
57+
confidence=
58+
59+
# Enable the message, report, category or checker with the given id(s). You can
60+
# either give multiple identifier separated by comma (,) or put this option
61+
# multiple time. See also the "--disable" option for examples.
62+
#enable=
63+
64+
# Disable the message, report, category or checker with the given id(s). You
65+
# can either give multiple identifiers separated by comma (,) or put this
66+
# option multiple times (only on the command line, not in the configuration
67+
# file where it should appear only once).You can also use "--disable=all" to
68+
# disable everything first and then reenable specific checks. For example, if
69+
# you want to run only the similarities checker, you can use "--disable=all
70+
# --enable=similarities". If you want to run only the classes checker, but have
71+
# no Warning level messages displayed, use"--disable=all --enable=classes
72+
# --disable=W"
73+
disable=E1608,W1627,E1601,E1603,E1602,E1605,E1604,E1607,E1606,W1621,W1620,W1623,W1622,W1625,W1624,W1609,W1608,W1607,W1606,W1605,W1604,W1603,W1602,W1601,W1639,W1640,I0021,W1638,I0020,W1618,W1619,W1630,W1626,W1637,W1634,W1635,W1610,W1611,W1612,W1613,W1614,W1615,W1616,W1617,W1632,W1633,W0704,W1628,W1629,W1636
74+
75+
76+
[REPORTS]
77+
78+
# Set the output format. Available formats are text, parseable, colorized, msvs
79+
# (visual studio) and html. You can also give a reporter class, eg
80+
# mypackage.mymodule.MyReporterClass.
81+
output-format=text
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 whether 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+
# respectively contain the number of errors / warnings messages and the total
94+
# number of statements analyzed. This is used by the global evaluation report
95+
# (RP0004).
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 (RP0004).
100+
comment=no
101+
102+
# Template used to display messages. This is a python new-style format string
103+
# used to format the message information. See doc for all details
104+
#msg-template=
105+
106+
107+
[SIMILARITIES]
108+
109+
# Minimum lines number of a similarity.
110+
min-similarity-lines=4
111+
112+
# Ignore comments when computing similarities.
113+
ignore-comments=yes
114+
115+
# Ignore docstrings when computing similarities.
116+
ignore-docstrings=yes
117+
118+
# Ignore imports when computing similarities.
119+
ignore-imports=no
120+
121+
122+
[LOGGING]
123+
124+
# Logging modules to check that the string format arguments are in logging
125+
# function parameter format
126+
logging-modules=logging
127+
128+
129+
[VARIABLES]
130+
131+
# Tells whether we should check for unused import in __init__ files.
132+
init-import=no
133+
134+
# A regular expression matching the name of dummy variables (i.e. expectedly
135+
# not used).
136+
dummy-variables-rgx=_$|dummy
137+
138+
# List of additional names supposed to be defined in builtins. Remember that
139+
# you should avoid to define new builtins when possible.
140+
additional-builtins=
141+
142+
# List of strings which can identify a callback function by name. A callback
143+
# name must start or end with one of those strings.
144+
callbacks=cb_,_cb
145+
146+
147+
[SPELLING]
148+
149+
# Spelling dictionary name. Available dictionaries: none. To make it working
150+
# install python-enchant package.
151+
spelling-dict=
152+
153+
# List of comma separated words that should not be checked.
154+
spelling-ignore-words=
155+
156+
# A path to a file that contains private dictionary; one word per line.
157+
spelling-private-dict-file=
158+
159+
# Tells whether to store unknown words to indicated private dictionary in
160+
# --spelling-private-dict-file option instead of raising a message.
161+
spelling-store-unknown-words=no
162+
163+
164+
[FORMAT]
165+
166+
# Maximum number of characters on a single line.
167+
max-line-length=100
168+
169+
# Regexp for a line that is allowed to be longer than the limit.
170+
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
171+
172+
# Allow the body of an if to be on the same line as the test if there is no
173+
# else.
174+
single-line-if-stmt=no
175+
176+
# List of optional constructs for which whitespace checking is disabled
177+
no-space-check=trailing-comma,dict-separator
178+
179+
# Maximum number of lines in a module
180+
max-module-lines=1000
181+
182+
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
183+
# tab).
184+
indent-string=' '
185+
186+
# Number of spaces of indent required inside a hanging or continued line.
187+
indent-after-paren=4
188+
189+
# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
190+
expected-line-ending-format=
191+
192+
193+
[MISCELLANEOUS]
194+
195+
# List of note tags to take in consideration, separated by a comma.
196+
notes=FIXME,XXX,TODO
197+
198+
199+
[BASIC]
200+
201+
# Required attributes for module, separated by a comma
202+
required-attributes=
203+
204+
# List of builtins function names that should not be used, separated by a comma
205+
bad-functions=map,filter,input
206+
207+
# Good variable names which should always be accepted, separated by a comma
208+
good-names=i,j,k,ex,Run,_
209+
210+
# Bad variable names which should always be refused, separated by a comma
211+
bad-names=foo,bar,baz,toto,tutu,tata
212+
213+
# Colon-delimited sets of names that determine each other's naming style when
214+
# the name regexes allow several styles.
215+
name-group=
216+
217+
# Include a hint for the correct naming format with invalid-name
218+
include-naming-hint=no
219+
220+
# Regular expression matching correct function names
221+
function-rgx=[a-z_][a-z0-9_]{2,30}$
222+
223+
# Naming hint for function names
224+
function-name-hint=[a-z_][a-z0-9_]{2,30}$
225+
226+
# Regular expression matching correct variable names
227+
variable-rgx=[a-z_][a-z0-9_]{2,30}$
228+
229+
# Naming hint for variable names
230+
variable-name-hint=[a-z_][a-z0-9_]{2,30}$
231+
232+
# Regular expression matching correct constant names
233+
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
234+
235+
# Naming hint for constant names
236+
const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
237+
238+
# Regular expression matching correct attribute names
239+
attr-rgx=[a-z_][a-z0-9_]{2,30}$
240+
241+
# Naming hint for attribute names
242+
attr-name-hint=[a-z_][a-z0-9_]{2,30}$
243+
244+
# Regular expression matching correct argument names
245+
argument-rgx=[a-z_][a-z0-9_]{2,30}$
246+
247+
# Naming hint for argument names
248+
argument-name-hint=[a-z_][a-z0-9_]{2,30}$
249+
250+
# Regular expression matching correct class attribute names
251+
class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
252+
253+
# Naming hint for class attribute names
254+
class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
255+
256+
# Regular expression matching correct inline iteration names
257+
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
258+
259+
# Naming hint for inline iteration names
260+
inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
261+
262+
# Regular expression matching correct class names
263+
class-rgx=[A-Z_][a-zA-Z0-9]+$
264+
265+
# Naming hint for class names
266+
class-name-hint=[A-Z_][a-zA-Z0-9]+$
267+
268+
# Regular expression matching correct module names
269+
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
270+
271+
# Naming hint for module names
272+
module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
273+
274+
# Regular expression matching correct method names
275+
method-rgx=[a-z_][a-z0-9_]{2,30}$
276+
277+
# Naming hint for method names
278+
method-name-hint=[a-z_][a-z0-9_]{2,30}$
279+
280+
# Regular expression which should only match function or class names that do
281+
# not require a docstring.
282+
no-docstring-rgx=__.*__
283+
284+
# Minimum line length for functions/classes that require docstrings, shorter
285+
# ones are exempt.
286+
docstring-min-length=-1
287+
288+
289+
[TYPECHECK]
290+
291+
# Tells whether missing members accessed in mixin class should be ignored. A
292+
# mixin class is detected if its name ends with "mixin" (case insensitive).
293+
ignore-mixin-members=yes
294+
295+
# List of module names for which member attributes should not be checked
296+
# (useful for modules/projects where namespaces are manipulated during runtime
297+
# and thus existing member attributes cannot be deduced by static analysis
298+
ignored-modules=
299+
300+
# List of classes names for which member attributes should not be checked
301+
# (useful for classes with attributes dynamically set).
302+
ignored-classes=SQLObject
303+
304+
# When zope mode is activated, add a predefined set of Zope acquired attributes
305+
# to generated-members.
306+
zope=no
307+
308+
# List of members which are set dynamically and missed by pylint inference
309+
# system, and so shouldn't trigger E0201 when accessed. Python regular
310+
# expressions are accepted.
311+
generated-members=REQUEST,acl_users,aq_parent
312+
313+
314+
[CLASSES]
315+
316+
# List of interface methods to ignore, separated by a comma. This is used for
317+
# instance to not check methods defines in Zope's Interface base class.
318+
ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
319+
320+
# List of method names used to declare (i.e. assign) instance attributes.
321+
defining-attr-methods=__init__,__new__,setUp
322+
323+
# List of valid names for the first argument in a class method.
324+
valid-classmethod-first-arg=cls
325+
326+
# List of valid names for the first argument in a metaclass class method.
327+
valid-metaclass-classmethod-first-arg=mcs
328+
329+
# List of member names, which should be excluded from the protected access
330+
# warning.
331+
exclude-protected=_asdict,_fields,_replace,_source,_make
332+
333+
334+
[DESIGN]
335+
336+
# Maximum number of arguments for function / method
337+
max-args=5
338+
339+
# Argument names that match this expression will be ignored. Default to name
340+
# with leading underscore
341+
ignored-argument-names=_.*
342+
343+
# Maximum number of locals for function / method body
344+
max-locals=15
345+
346+
# Maximum number of return / yield for function / method body
347+
max-returns=6
348+
349+
# Maximum number of branch for function / method body
350+
max-branches=12
351+
352+
# Maximum number of statements in function / method body
353+
max-statements=50
354+
355+
# Maximum number of parents for a class (see R0901).
356+
max-parents=7
357+
358+
# Maximum number of attributes for a class (see R0902).
359+
max-attributes=7
360+
361+
# Minimum number of public methods for a class (see R0903).
362+
min-public-methods=2
363+
364+
# Maximum number of public methods for a class (see R0904).
365+
max-public-methods=20
366+
367+
368+
[IMPORTS]
369+
370+
# Deprecated modules which should not be used, separated by a comma
371+
deprecated-modules=regsub,TERMIOS,Bastion,rexec
372+
373+
# Create a graph of every (i.e. internal and external) dependencies in the
374+
# given file (report RP0402 must not be disabled)
375+
import-graph=
376+
377+
# Create a graph of external dependencies in the given file (report RP0402 must
378+
# not be disabled)
379+
ext-import-graph=
380+
381+
# Create a graph of internal dependencies in the given file (report RP0402 must
382+
# not be disabled)
383+
int-import-graph=
384+
385+
386+
[EXCEPTIONS]
387+
388+
# Exceptions that will emit a warning when being caught. Defaults to
389+
# "Exception"
390+
overgeneral-exceptions=Exception

0 commit comments

Comments
 (0)