Skip to content

Commit ceb7934

Browse files
authored
Merge pull request #180 from florisvb/linting
linting
2 parents 28c186c + 120e78f commit ceb7934

22 files changed

Lines changed: 155 additions & 523 deletions

.coveragerc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ exclude_lines =
1010
pragma: no cover
1111
if __name__ == .__main__.:
1212
if diagflag:
13-
if options != None:
13+
if options is not None:
1414
^def plot
1515
^def plot_comparison
1616
^def suggest_method

.pylintrc

Lines changed: 15 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,15 @@
11
[MASTER]
22

3-
# A comma-separated list of package or module names from where C extensions may
4-
# be loaded. Extensions are loading into the active Python interpreter and may
5-
# run arbitrary code.
6-
extension-pkg-allow-list=
7-
8-
# A comma-separated list of package or module names from where C extensions may
9-
# be loaded. Extensions are loading into the active Python interpreter and may
10-
# run arbitrary code. (This is an alternative name to extension-pkg-allow-list
11-
# for backward compatibility.)
12-
extension-pkg-whitelist=
13-
143
# Specify a score threshold to be exceeded before program exits with error.
15-
fail-under=10.0
4+
fail-under=8.5
165

176
# Files or directories to be skipped. They should be base names, not paths.
18-
ignore=CVS
7+
ignore=_version.py, _chartrand_tvregdiff.py
198

209
# Files or directories matching the regex patterns are skipped. The regex
2110
# matches against base names, not paths.
2211
ignore-patterns=
2312

24-
# Python code to execute, usually for sys.path manipulation such as
25-
# pygtk.require().
26-
#init-hook=
27-
2813
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
2914
# number of processors available to use.
3015
jobs=1
@@ -34,22 +19,13 @@ jobs=1
3419
# complex, nested conditions.
3520
limit-inference-results=100
3621

37-
# List of plugins (as comma separated values of python module names) to load,
38-
# usually to register additional checkers.
39-
load-plugins=
40-
4122
# Pickle collected data for later comparisons.
4223
persistent=yes
4324

4425
# When enabled, pylint would attempt to guess common misconfiguration and emit
4526
# user-friendly hints instead of false-positive error messages.
4627
suggestion-mode=yes
4728

48-
# Allow loading of arbitrary C extensions. Extensions are imported into the
49-
# active Python interpreter and may run arbitrary code.
50-
unsafe-load-any-extension=no
51-
52-
5329
[MESSAGES CONTROL]
5430

5531
# Only show warnings with the listed confidence levels. Leave empty to show
@@ -75,85 +51,17 @@ disable=dangerous-default-value,
7551
duplicate-code,
7652
invalid-name,
7753
invalid-unary-operand-type,
78-
print-statement,
79-
parameter-unpacking,
80-
unpacking-in-except,
81-
old-raise-syntax,
82-
backtick,
83-
long-suffix,
84-
old-ne-operator,
85-
old-octal-literal,
86-
import-star-module-level,
87-
non-ascii-bytes-literal,
88-
raw-checker-failed,
89-
bad-inline-option,
90-
locally-disabled,
91-
file-ignored,
92-
suppressed-message,
93-
useless-suppression,
94-
deprecated-pragma,
95-
use-symbolic-message-instead,
96-
apply-builtin,
97-
basestring-builtin,
98-
buffer-builtin,
99-
cmp-builtin,
100-
coerce-builtin,
101-
execfile-builtin,
102-
file-builtin,
103-
long-builtin,
104-
raw_input-builtin,
105-
reduce-builtin,
106-
standarderror-builtin,
107-
unicode-builtin,
108-
xrange-builtin,
109-
coerce-method,
110-
delslice-method,
111-
getslice-method,
112-
setslice-method,
113-
no-absolute-import,
114-
old-division,
115-
dict-iter-method,
116-
dict-view-method,
117-
next-method-called,
118-
metaclass-assignment,
119-
indexing-exception,
120-
raising-string,
121-
reload-builtin,
122-
oct-method,
123-
hex-method,
124-
nonzero-method,
125-
cmp-method,
126-
input-builtin,
127-
round-builtin,
128-
intern-builtin,
129-
unichr-builtin,
130-
map-builtin-not-iterating,
131-
zip-builtin-not-iterating,
132-
range-builtin-not-iterating,
133-
filter-builtin-not-iterating,
134-
using-cmp-argument,
135-
eq-without-hash,
136-
div-method,
137-
idiv-method,
138-
rdiv-method,
139-
exception-message-attribute,
140-
invalid-str-codec,
141-
sys-max-int,
142-
bad-python3-import,
143-
deprecated-string-function,
144-
deprecated-str-translate-call,
145-
deprecated-itertools-function,
146-
deprecated-types-field,
147-
next-method-defined,
148-
dict-items-not-iterating,
149-
dict-keys-not-iterating,
150-
dict-values-not-iterating,
151-
deprecated-operator-function,
152-
deprecated-urllib-function,
153-
xreadlines-attribute,
154-
deprecated-sys-function,
155-
exception-escape,
156-
comprehension-escape
54+
raw-checker-failed,
55+
bad-inline-option,
56+
locally-disabled,
57+
file-ignored,
58+
suppressed-message,
59+
useless-suppression,
60+
deprecated-pragma,
61+
use-symbolic-message-instead,
62+
multiple-statements,
63+
multiple-imports,
64+
too-many-positional-arguments
15765

15866
# Enable the message, report, category or checker with the given id(s). You can
15967
# either give multiple identifier separated by comma (,) or put this option
@@ -617,5 +525,5 @@ min-public-methods=2
617525

618526
# Exceptions that will emit a warning when being caught. Defaults to
619527
# "BaseException, Exception".
620-
overgeneral-exceptions=BaseException,
621-
Exception
528+
overgeneral-exceptions=builtins.BaseException,
529+
builtins.Exception

0 commit comments

Comments
 (0)