summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2014-09-21 09:25:23 -0400
committerNed Batchelder <ned@nedbatchelder.com>2014-09-21 09:25:23 -0400
commitf491f4f37ff2e18090b1f8c74d20a95591f4fc81 (patch)
treec46e77ffe8dcf9a57055c5ce482561177d03c6a2
parent39538e9f8a93b4cf808e56022483cd04b326fe08 (diff)
downloadpython-coveragepy-git-f491f4f37ff2e18090b1f8c74d20a95591f4fc81.tar.gz
Pylint upgrade and cleanup.
-rw-r--r--coverage/bytecode.py1
-rw-r--r--coverage/codeunit.py2
-rw-r--r--coverage/summary.py2
-rw-r--r--pylintrc5
-rw-r--r--tests/test_cmdline.py2
-rw-r--r--tests/test_execfile.py2
6 files changed, 5 insertions, 9 deletions
diff --git a/coverage/bytecode.py b/coverage/bytecode.py
index 85360638..3f62dfaf 100644
--- a/coverage/bytecode.py
+++ b/coverage/bytecode.py
@@ -29,7 +29,6 @@ class ByteCodes(object):
Returns `ByteCode` objects.
"""
- # pylint: disable=R0924
def __init__(self, code):
self.code = code
diff --git a/coverage/codeunit.py b/coverage/codeunit.py
index 4e752aaa..c9ab2622 100644
--- a/coverage/codeunit.py
+++ b/coverage/codeunit.py
@@ -7,8 +7,6 @@ from coverage.misc import CoverageException, NoSource
from coverage.parser import CodeParser, PythonParser
from coverage.phystokens import source_token_lines, source_encoding
-from coverage.django import DjangoTracer
-
def code_unit_factory(morfs, file_locator, get_plugin=None):
"""Construct a list of CodeUnits from polymorphic inputs.
diff --git a/coverage/summary.py b/coverage/summary.py
index a6768cf9..9d31c226 100644
--- a/coverage/summary.py
+++ b/coverage/summary.py
@@ -71,7 +71,7 @@ class SummaryReporter(Reporter):
total += nums
except KeyboardInterrupt: # pragma: not covered
raise
- except:
+ except Exception:
report_it = not self.config.ignore_errors
if report_it:
typ, msg = sys.exc_info()[:2]
diff --git a/pylintrc b/pylintrc
index 486bf348..c247fb78 100644
--- a/pylintrc
+++ b/pylintrc
@@ -68,6 +68,8 @@ disable=
# R0201: 42:Tracer.stop: Method could be a function
# E1103: 26:RunTests.test_run_python_file: Instance of 'file' has no 'getvalue' member (but some types could not be inferred)
R0201,E1103,
+# formatting stuff
+ superfluous-parens,bad-continuation,
# Messages that are noisy for now, eventually maybe we'll turn them on:
# C0103:256:coverage.morf_filename: Invalid name "f" (should match [a-z_][a-z0-9_]{2,30}$)
# W0212: 86:Reporter.report_files: Access to a protected member _analyze of a client class
@@ -79,9 +81,6 @@ disable=
# (visual studio) and html
output-format=text
-# Include message's id in output
-include-ids=yes
-
# Put messages in a separate file for each module / package specified on the
# command line instead of printing them on stdout. Reports (if any) will be
# written in a file name "pylint_global.[txt|html]".
diff --git a/tests/test_cmdline.py b/tests/test_cmdline.py
index 038e9214..08f7937a 100644
--- a/tests/test_cmdline.py
+++ b/tests/test_cmdline.py
@@ -72,7 +72,7 @@ class CmdLineTest(CoverageTest):
code = re.sub(r"(?m)^\.", "m2.", code)
m2 = self.model_object()
code_obj = compile(code, "<code>", "exec")
- eval(code_obj, globals(), { 'm2': m2 })
+ eval(code_obj, globals(), { 'm2': m2 }) # pylint: disable=eval-used
# Many of our functions take a lot of arguments, and cmdline.py
# calls them with many. But most of them are just the defaults, which
diff --git a/tests/test_execfile.py b/tests/test_execfile.py
index 2427847e..69616e84 100644
--- a/tests/test_execfile.py
+++ b/tests/test_execfile.py
@@ -16,7 +16,7 @@ class RunFileTest(CoverageTest):
def test_run_python_file(self):
tryfile = os.path.join(here, "try_execfile.py")
run_python_file(tryfile, [tryfile, "arg1", "arg2"])
- mod_globs = eval(self.stdout())
+ mod_globs = eval(self.stdout()) # pylint: disable=eval-used
# The file should think it is __main__
self.assertEqual(mod_globs['__name__'], "__main__")