Skip to content
This repository was archived by the owner on Nov 8, 2024. It is now read-only.

Commit 85ca372

Browse files
committed
pylint: added correct pylint file
1 parent 7248ea2 commit 85ca372

File tree

3 files changed

+387
-1
lines changed

3 files changed

+387
-1
lines changed

.python-version

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
11
3.5.1
2+
3.4.4
3+
3.3.5
4+
3.2.5
5+
3.1.5
6+
3.0.1
7+
2.7.11
8+
pypy-4.0.1
9+
pypy3-2.4.0

pylint.rc

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

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ commands=python setup.py clean --all nosetests
1010
[testenv:lint]
1111
basepython=python3.5
1212
deps=pylint
13-
commands=pylint --rcfile=pylint.rc > pylint.log
13+
commands=pylint --rcfile=pylint.rc ./src/filterparams/ ./test/filterparams_tests/ > pylint.log
1414

0 commit comments

Comments
 (0)