summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2014-11-23 06:43:15 -0500
committerNed Batchelder <ned@nedbatchelder.com>2014-11-23 06:43:15 -0500
commitd0a872c92e0e8c6ebb9530c2b61f2b9582612fb4 (patch)
treed2dee99e59bb7d0048f3152695baea7b7e01421b
parent29356409a6827e78d3f5aa18d9a7939bee7b6fca (diff)
downloadpython-coveragepy-d0a872c92e0e8c6ebb9530c2b61f2b9582612fb4.tar.gz
Change all pylint message codes to message names
-rw-r--r--coverage/__init__.py4
-rw-r--r--coverage/backward.py2
-rw-r--r--coverage/collector.py2
-rw-r--r--coverage/control.py2
-rw-r--r--coverage/parser.py2
-rw-r--r--igor.py4
-rw-r--r--pylintrc2
-rw-r--r--setup.py6
-rw-r--r--tests/backtest.py2
-rw-r--r--tests/test_api.py6
-rw-r--r--tests/test_cmdline.py2
-rw-r--r--tests/test_codeunit.py2
-rw-r--r--tests/test_farm.py3
-rw-r--r--tests/test_process.py2
-rw-r--r--tests/test_summary.py10
-rw-r--r--tests/test_xml.py2
16 files changed, 27 insertions, 26 deletions
diff --git a/coverage/__init__.py b/coverage/__init__.py
index 67dd6e8..3a52c1d 100644
--- a/coverage/__init__.py
+++ b/coverage/__init__.py
@@ -34,9 +34,9 @@ def _singleton_method(name):
called.
"""
- # Disable pylint msg W0612, because a bunch of variables look unused, but
+ # Disable pylint message, because a bunch of variables look unused, but
# they're accessed via locals().
- # pylint: disable=W0612
+ # pylint: disable=unused-variable
def wrapper(*args, **kwargs):
"""Singleton wrapper around a coverage method."""
diff --git a/coverage/backward.py b/coverage/backward.py
index d02385a..3372a8b 100644
--- a/coverage/backward.py
+++ b/coverage/backward.py
@@ -151,7 +151,7 @@ def import_local_file(modname):
break
with open(modfile, 'r') as f:
- # pylint: disable=W0631
+ # pylint: disable=undefined-loop-variable
# (Using possibly undefined loop variable 'suff')
mod = imp.load_module(modname, f, modfile, suff)
diff --git a/coverage/collector.py b/coverage/collector.py
index 47ae450..72a7b7f 100644
--- a/coverage/collector.py
+++ b/coverage/collector.py
@@ -7,7 +7,7 @@ from coverage.pytracer import PyTracer
try:
# Use the C extension code when we can, for speed.
- from coverage.tracer import CTracer # pylint: disable=E0611
+ from coverage.tracer import CTracer # pylint: disable=no-name-in-module
except ImportError:
# Couldn't import the C extension, maybe it isn't built.
if os.getenv('COVERAGE_TEST_TRACER') == 'c':
diff --git a/coverage/control.py b/coverage/control.py
index d1c0a24..a0a70de 100644
--- a/coverage/control.py
+++ b/coverage/control.py
@@ -731,7 +731,7 @@ class Coverage(object):
return Analysis(self, it)
def report(self, morfs=None, show_missing=True, ignore_errors=None,
- file=None, # pylint: disable=W0622
+ file=None, # pylint: disable=redefined-builtin
omit=None, include=None
):
"""Write a summary report to `file`.
diff --git a/coverage/parser.py b/coverage/parser.py
index a1e3a92..8b9cc1e 100644
--- a/coverage/parser.py
+++ b/coverage/parser.py
@@ -3,7 +3,7 @@
import collections, dis, re, token, tokenize
from coverage.backward import StringIO
-from coverage.backward import range # pylint: disable=W0622
+from coverage.backward import range # pylint: disable=redefined-builtin
from coverage.backward import bytes_to_ints, open_python_source
from coverage.bytecode import ByteCodes, CodeObjects
from coverage.misc import nice_pair, expensive, join_regex
diff --git a/igor.py b/igor.py
index 2f1a2c5..3a1b6e2 100644
--- a/igor.py
+++ b/igor.py
@@ -99,7 +99,7 @@ def run_tests_with_coverage(tracer, *nose_args):
if getattr(mod, '__file__', "??").startswith(covdir):
covmods[name] = mod
del sys.modules[name]
- import coverage # don't warn about re-import: pylint: disable=W0404
+ import coverage # don't warn about re-import: pylint: disable=reimported
sys.modules.update(covmods)
# Run nosetests, with the arguments from our command line.
@@ -140,7 +140,7 @@ def do_zip_mods():
def do_install_egg():
"""Install the egg1 egg for tests."""
# I am pretty certain there are easier ways to install eggs...
- # pylint: disable=F0401,E0611
+ # pylint: disable=import-error,no-name-in-module
import distutils.core
cur_dir = os.getcwd()
os.chdir("tests/eggsrc")
diff --git a/pylintrc b/pylintrc
index 037ecc1..15a3b4d 100644
--- a/pylintrc
+++ b/pylintrc
@@ -77,7 +77,7 @@ disable=
# W0212: 86:Reporter.report_files: Access to a protected member _analyze of a client class
C0103,W0212
-msg-template={path}, {line}: {msg} ({symbol}, {msg_id})
+msg-template={path}:{line}: {msg} ({symbol})
[REPORTS]
diff --git a/setup.py b/setup.py
index 18fa903..7139ce3 100644
--- a/setup.py
+++ b/setup.py
@@ -46,9 +46,9 @@ Topic :: Software Development :: Testing
import os, sys
from setuptools import setup
-from distutils.core import Extension # pylint: disable=E0611,F0401
-from distutils.command.build_ext import build_ext # pylint: disable=E0611
-from distutils import errors # pylint: disable=E0611
+from distutils.core import Extension # pylint: disable=no-name-in-module,import-error
+from distutils.command.build_ext import build_ext # pylint: disable=no-name-in-module
+from distutils import errors # pylint: disable=no-name-in-module
# Get or massage our metadata. We exec coverage/version.py so we can avoid
# importing the product code into setup.py.
diff --git a/tests/backtest.py b/tests/backtest.py
index 1b38cce..574e6ac 100644
--- a/tests/backtest.py
+++ b/tests/backtest.py
@@ -1,6 +1,6 @@
"""Add things to old Pythons so I can pretend they are newer, for tests."""
-# pylint: disable=W0622
+# pylint: disable=redefined-builtin
# (Redefining built-in blah)
# The whole point of this file is to redefine built-ins, so shut up about it.
diff --git a/tests/test_api.py b/tests/test_api.py
index 31bfc57..ca65d6d 100644
--- a/tests/test_api.py
+++ b/tests/test_api.py
@@ -448,7 +448,7 @@ class SourceOmitIncludeTest(OmitIncludeTestsMixin, CoverageTest):
"""
cov = coverage.coverage(**kwargs)
cov.start()
- import usepkgs # pragma: nested # pylint: disable=F0401,W0612
+ import usepkgs # pragma: nested # pylint: disable=import-error,unused-variable
cov.stop() # pragma: nested
cov._harvest_data() # private! sshhh...
summary = cov.data.summary()
@@ -487,7 +487,7 @@ class ReportIncludeOmitTest(OmitIncludeTestsMixin, CoverageTest):
"""Try coverage.report()."""
cov = coverage.coverage()
cov.start()
- import usepkgs # pragma: nested # pylint: disable=F0401,W0612
+ import usepkgs # pragma: nested # pylint: disable=import-error,unused-variable
cov.stop() # pragma: nested
report = StringIO()
cov.report(file=report, **kwargs)
@@ -506,7 +506,7 @@ class XmlIncludeOmitTest(OmitIncludeTestsMixin, CoverageTest):
"""Try coverage.xml_report()."""
cov = coverage.coverage()
cov.start()
- import usepkgs # pragma: nested # pylint: disable=F0401,W0612
+ import usepkgs # pragma: nested # pylint: disable=import-error,unused-variable
cov.stop() # pragma: nested
cov.xml_report(outfile="-", **kwargs)
return self.stdout()
diff --git a/tests/test_cmdline.py b/tests/test_cmdline.py
index 695c3be..a2ec5c0 100644
--- a/tests/test_cmdline.py
+++ b/tests/test_cmdline.py
@@ -153,7 +153,7 @@ class FakeCoverageForDebugData(object):
"""Fake coverage().data.has_arcs()"""
return False
- def summary(self, fullpath): # pylint: disable=W0613
+ def summary(self, fullpath): # pylint: disable=unused-argument
"""Fake coverage().data.summary()"""
return self._summary
diff --git a/tests/test_codeunit.py b/tests/test_codeunit.py
index fe82ea1..4998126 100644
--- a/tests/test_codeunit.py
+++ b/tests/test_codeunit.py
@@ -7,7 +7,7 @@ from coverage.files import FileLocator
from tests.coveragetest import CoverageTest
-# pylint: disable=F0401
+# pylint: disable=import-error
# Unable to import 'aa' (No module named aa)
class CodeUnitTest(CoverageTest):
diff --git a/tests/test_farm.py b/tests/test_farm.py
index 9e369cf..661c67b 100644
--- a/tests/test_farm.py
+++ b/tests/test_farm.py
@@ -3,7 +3,8 @@
import difflib, filecmp, fnmatch, glob, os, re, shutil, sys
from nose.plugins.skip import SkipTest
-from tests.backtest import run_command, execfile # pylint: disable=W0622
+from tests.backtest import run_command
+from tests.backtest import execfile # pylint: disable=redefined-builtin
from coverage.control import _TEST_NAME_FILE
diff --git a/tests/test_process.py b/tests/test_process.py
index ac5c6e1..4584e7d 100644
--- a/tests/test_process.py
+++ b/tests/test_process.py
@@ -661,7 +661,7 @@ class ProcessStartupTest(CoverageTest):
data_file = .mycovdata
""")
self.set_environ("COVERAGE_PROCESS_START", "coverage.ini")
- import main # pylint: disable=F0401,W0612
+ import main # pylint: disable=import-error,unused-variable
with open("out.txt") as f:
self.assertEqual(f.read(), "Hello, world!\n")
diff --git a/tests/test_summary.py b/tests/test_summary.py
index c8364ca..9973b3d 100644
--- a/tests/test_summary.py
+++ b/tests/test_summary.py
@@ -231,7 +231,7 @@ class SummaryTest(CoverageTest):
self.make_file("mycode.py", "This isn't python at all!")
report = self.report_from_command("coverage report mycode.py")
- # pylint: disable=C0301
+ # pylint: disable=line-too-long
# Name Stmts Miss Cover
# ----------------------------
# mycode NotPython: Couldn't parse '/tmp/test_cover/63354509363/mycode.py' as Python source: 'invalid syntax' at line 1
@@ -297,7 +297,7 @@ class SummaryTest(CoverageTest):
""")
cov = coverage.coverage(branch=True, source=["."])
cov.start()
- import main # pragma: nested # pylint: disable=F0401,W0612
+ import main # pragma: nested # pylint: disable=import-error,unused-variable
cov.stop() # pragma: nested
report = self.get_report(cov).splitlines()
self.assertIn("mybranch 5 5 2 0 0%", report)
@@ -306,7 +306,7 @@ class SummaryTest(CoverageTest):
"""A helper for the next few tests."""
cov = coverage.coverage()
cov.start()
- import TheCode # pragma: nested # pylint: disable=F0401,W0612
+ import TheCode # pragma: nested # pylint: disable=import-error,unused-variable
cov.stop() # pragma: nested
return self.get_report(cov)
@@ -339,7 +339,7 @@ class SummaryTest(CoverageTest):
""")
cov = coverage.coverage()
cov.start()
- import start # pragma: nested # pylint: disable=F0401,W0612
+ import start # pragma: nested # pylint: disable=import-error,unused-variable
cov.stop() # pragma: nested
report = self.get_report(cov)
@@ -369,7 +369,7 @@ class SummaryTest2(CoverageTest):
# statements, not one statement.
cov = coverage.coverage()
cov.start()
- import usepkgs # pragma: nested # pylint: disable=F0401,W0612
+ import usepkgs # pragma: nested # pylint: disable=import-error,unused-variable
cov.stop() # pragma: nested
repout = StringIO()
diff --git a/tests/test_xml.py b/tests/test_xml.py
index 37ada3c..3c7d236 100644
--- a/tests/test_xml.py
+++ b/tests/test_xml.py
@@ -80,7 +80,7 @@ class XmlReportTest(CoverageTest):
def test_filename_format_including_module(self):
cov = self.run_doit()
- import sub.doit # pylint: disable=F0401
+ import sub.doit # pylint: disable=import-error
cov.xml_report([sub.doit], outfile="-")
xml = self.stdout()
doit_line = re_line(xml, "class.*doit")