diff options
-rw-r--r-- | coverage/__init__.py | 4 | ||||
-rw-r--r-- | coverage/backward.py | 2 | ||||
-rw-r--r-- | coverage/collector.py | 2 | ||||
-rw-r--r-- | coverage/control.py | 2 | ||||
-rw-r--r-- | coverage/parser.py | 2 | ||||
-rw-r--r-- | igor.py | 4 | ||||
-rw-r--r-- | pylintrc | 2 | ||||
-rw-r--r-- | setup.py | 6 | ||||
-rw-r--r-- | tests/backtest.py | 2 | ||||
-rw-r--r-- | tests/test_api.py | 6 | ||||
-rw-r--r-- | tests/test_cmdline.py | 2 | ||||
-rw-r--r-- | tests/test_codeunit.py | 2 | ||||
-rw-r--r-- | tests/test_farm.py | 3 | ||||
-rw-r--r-- | tests/test_process.py | 2 | ||||
-rw-r--r-- | tests/test_summary.py | 10 | ||||
-rw-r--r-- | tests/test_xml.py | 2 |
16 files changed, 27 insertions, 26 deletions
diff --git a/coverage/__init__.py b/coverage/__init__.py index 67dd6e88..3a52c1d6 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 d02385ad..3372a8b3 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 47ae4505..72a7b7f1 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 d1c0a245..a0a70de3 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 a1e3a923..8b9cc1ee 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 @@ -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") @@ -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] @@ -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 1b38cce1..574e6ac4 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 31bfc57f..ca65d6de 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 695c3bec..a2ec5c0a 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 fe82ea1c..49981264 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 9e369cf3..661c67b7 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 ac5c6e1b..4584e7d7 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 c8364ca5..9973b3d5 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 37ada3cb..3c7d2361 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") |