summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coverage/backward.py2
-rw-r--r--coverage/cmdline.py2
-rw-r--r--coverage/config.py8
-rw-r--r--coverage/control.py1
-rw-r--r--coverage/parser.py1
-rw-r--r--igor.py4
-rw-r--r--pylintrc6
-rw-r--r--requirements/dev.pip2
-rw-r--r--tests/test_cmdline.py2
-rw-r--r--tests/test_process.py2
-rw-r--r--tests/test_summary.py1
11 files changed, 14 insertions, 17 deletions
diff --git a/coverage/backward.py b/coverage/backward.py
index 8d2218d2..62ca495f 100644
--- a/coverage/backward.py
+++ b/coverage/backward.py
@@ -48,7 +48,7 @@ except ImportError:
try:
range = xrange # pylint: disable=redefined-builtin
except NameError:
- range = range # pylint: disable=redefined-variable-type
+ range = range
# shlex.quote is new, but there's an undocumented implementation in "pipes",
# who knew!?
diff --git a/coverage/cmdline.py b/coverage/cmdline.py
index 9c908b14..63e4eb1f 100644
--- a/coverage/cmdline.py
+++ b/coverage/cmdline.py
@@ -752,7 +752,7 @@ def main(argv=None):
# An exception was caught while running the product code. The
# sys.exc_info() return tuple is packed into an ExceptionDuringRun
# exception.
- traceback.print_exception(*err.args)
+ traceback.print_exception(*err.args) # pylint: disable=no-value-for-parameter
status = ERR
except BaseCoverageException as err:
# A controlled error inside coverage.py: print the message to the user.
diff --git a/coverage/config.py b/coverage/config.py
index 3651de33..3fa64495 100644
--- a/coverage/config.py
+++ b/coverage/config.py
@@ -21,12 +21,12 @@ class HandyConfigParser(configparser.RawConfigParser):
configparser.RawConfigParser.__init__(self)
self.section_prefix = section_prefix
- def read(self, filename):
+ def read(self, filenames):
"""Read a file name as UTF-8 configuration data."""
kwargs = {}
if sys.version_info >= (3, 2):
kwargs['encoding'] = "utf-8"
- return configparser.RawConfigParser.read(self, filename, **kwargs)
+ return configparser.RawConfigParser.read(self, filenames, **kwargs)
def has_option(self, section, option):
section = self.section_prefix + section
@@ -47,7 +47,7 @@ class HandyConfigParser(configparser.RawConfigParser):
d[opt] = self.get(section, opt)
return d
- def get(self, section, *args, **kwargs):
+ def get(self, section, *args, **kwargs): # pylint: disable=arguments-differ
"""Get a value, replacing environment variables also.
The arguments are the same as `RawConfigParser.get`, but in the found
@@ -415,7 +415,7 @@ def read_coverage_config(config_file, **kwargs):
config_file = True
specified_file = (config_file is not True)
if not specified_file:
- config_file = ".coveragerc" # pylint: disable=redefined-variable-type
+ config_file = ".coveragerc"
for fname, prefix in [(config_file, ""),
("setup.cfg", "coverage:"),
diff --git a/coverage/control.py b/coverage/control.py
index aeca9f71..fb033610 100644
--- a/coverage/control.py
+++ b/coverage/control.py
@@ -959,7 +959,6 @@ class Coverage(object):
)
if file_reporter == "python":
- # pylint: disable=redefined-variable-type
file_reporter = PythonFileReporter(morf, self)
return file_reporter
diff --git a/coverage/parser.py b/coverage/parser.py
index ca6745f9..590eacee 100644
--- a/coverage/parser.py
+++ b/coverage/parser.py
@@ -106,7 +106,6 @@ class PythonParser(object):
"""
combined = join_regex(regexes)
if env.PY2:
- # pylint: disable=redefined-variable-type
combined = combined.decode("utf8")
regex_c = re.compile(combined)
matches = set()
diff --git a/igor.py b/igor.py
index c875a6f9..15e385e7 100644
--- a/igor.py
+++ b/igor.py
@@ -286,9 +286,9 @@ def do_check_eol():
def check_files(root, patterns, **kwargs):
"""Check a number of files for whitespace abuse."""
- for root, dirs, files in os.walk(root):
+ for where, dirs, files in os.walk(root):
for f in files:
- fname = os.path.join(root, f)
+ fname = os.path.join(where, f)
for p in patterns:
if fnmatch.fnmatch(fname, p):
check_file(fname, **kwargs)
diff --git a/pylintrc b/pylintrc
index cad40e8d..05bdf436 100644
--- a/pylintrc
+++ b/pylintrc
@@ -63,6 +63,7 @@ disable=
bad-whitespace,
global-statement,
broad-except,
+ no-else-return,
# Messages that may be silly:
no-self-use,
no-member,
@@ -197,8 +198,9 @@ acquired-members=REQUEST,acl_users,aq_parent
# Tells wether we should check for unused import in __init__ files.
init-import=no
-# A regular expression matching names used for dummy variables (i.e. not used).
-dummy-variables-rgx=_|dummy|unused|.*_unused
+# A regular expression matching names of unused arguments.
+ignored-argument-names=_|unused|.*_unused
+dummy-variables-rgx=_|unused|.*_unused
# List of additional names supposed to be defined in builtins. Remember that
# you should avoid to define new builtins when possible.
diff --git a/requirements/dev.pip b/requirements/dev.pip
index 65d457b4..064e5a5b 100644
--- a/requirements/dev.pip
+++ b/requirements/dev.pip
@@ -13,7 +13,7 @@ greenlet==0.4.11
mock==2.0.0
PyContracts==1.7.15
pyenchant==1.6.8
-pylint==1.7
+pylint==1.7.1
unittest-mixins==1.2.1
# for kitting.
diff --git a/tests/test_cmdline.py b/tests/test_cmdline.py
index 30fb06ee..2378887a 100644
--- a/tests/test_cmdline.py
+++ b/tests/test_cmdline.py
@@ -99,7 +99,7 @@ class BaseCmdLineTest(CoverageTest):
# calls them with many. But most of them are just the defaults, which
# we don't want to have to repeat in all tests. For each call, apply
# the defaults. This lets the tests just mention the interesting ones.
- for name, args, kwargs in m2.method_calls:
+ for name, _, kwargs in m2.method_calls:
for k, v in self.DEFAULT_KWARGS.get(name, {}).items():
if k not in kwargs:
kwargs[k] = v
diff --git a/tests/test_process.py b/tests/test_process.py
index 2f30fa1f..8a0f4e3b 100644
--- a/tests/test_process.py
+++ b/tests/test_process.py
@@ -1022,7 +1022,6 @@ class UnicodeFilePathsTest(CoverageTest):
)
if env.PY2:
- # pylint: disable=redefined-variable-type
report_expected = report_expected.encode(output_encoding())
out = self.run_command("coverage report")
@@ -1061,7 +1060,6 @@ class UnicodeFilePathsTest(CoverageTest):
)
if env.PY2:
- # pylint: disable=redefined-variable-type
report_expected = report_expected.encode(output_encoding())
out = self.run_command("coverage report")
diff --git a/tests/test_summary.py b/tests/test_summary.py
index 752a1776..7c9f4c12 100644
--- a/tests/test_summary.py
+++ b/tests/test_summary.py
@@ -444,7 +444,6 @@ class SummaryTest(CoverageTest):
u"Couldn't parse 'accented\xe2.py' as Python source: 'error' at line 1"
)
if env.PY2:
- # pylint: disable=redefined-variable-type
expected = expected.encode(output_encoding())
self.assertEqual(errmsg, expected)