diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2014-11-23 06:29:35 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2014-11-23 06:29:35 -0500 |
commit | b26cf4981ebc3bdbcec03386b4ee2734f5e9a444 (patch) | |
tree | f037dbb904169d1fa53d0c51961b0ee08b389e8a | |
parent | f4b9914ab81eca5762b66446afa3fd57f84d5ec5 (diff) | |
download | python-coveragepy-git-b26cf4981ebc3bdbcec03386b4ee2734f5e9a444.tar.gz |
Upgraded pylint to 1.4, removed useless suppressions
-rw-r--r-- | coverage/backunittest.py | 2 | ||||
-rw-r--r-- | coverage/backward.py | 4 | ||||
-rw-r--r-- | coverage/collector.py | 4 | ||||
-rw-r--r-- | coverage/config.py | 2 | ||||
-rw-r--r-- | coverage/control.py | 2 | ||||
-rw-r--r-- | coverage/execfile.py | 1 | ||||
-rw-r--r-- | coverage/parser.py | 2 | ||||
-rw-r--r-- | igor.py | 4 | ||||
-rw-r--r-- | pylintrc | 10 | ||||
-rw-r--r-- | setup.py | 4 | ||||
-rw-r--r-- | tests/backtest.py | 2 | ||||
-rw-r--r-- | tests/test_concurrency.py | 6 | ||||
-rw-r--r-- | tests/test_summary.py | 1 | ||||
-rw-r--r-- | tests/test_templite.py | 4 |
14 files changed, 23 insertions, 25 deletions
diff --git a/coverage/backunittest.py b/coverage/backunittest.py index b2b7ca2f..648e74ef 100644 --- a/coverage/backunittest.py +++ b/coverage/backunittest.py @@ -3,7 +3,7 @@ # Use unittest2 if it's available, otherwise unittest. This gives us # backported features for 2.6. try: - import unittest2 as unittest # pylint: disable=F0401 + import unittest2 as unittest except ImportError: import unittest diff --git a/coverage/backward.py b/coverage/backward.py index e839f6bd..d02385ad 100644 --- a/coverage/backward.py +++ b/coverage/backward.py @@ -2,8 +2,6 @@ # This file does lots of tricky stuff, so disable a bunch of lintisms. # pylint: disable=redefined-builtin -# pylint: disable=import-error -# pylint: disable=no-member # pylint: disable=unused-import # pylint: disable=no-name-in-module @@ -50,7 +48,7 @@ else: if sys.version_info >= (3, 0): # Python 3.2 provides `tokenize.open`, the best way to open source files. import tokenize - open_python_source = tokenize.open # pylint: disable=E1101 + open_python_source = tokenize.open else: def open_python_source(fname): """Open a source file the best way.""" diff --git a/coverage/collector.py b/coverage/collector.py index 001bc3d3..47ae4505 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=F0401,E0611 + from coverage.tracer import CTracer # pylint: disable=E0611 except ImportError: # Couldn't import the C extension, maybe it isn't built. if os.getenv('COVERAGE_TEST_TRACER') == 'c': @@ -24,7 +24,7 @@ except ImportError: CTracer = None try: - import __pypy__ # pylint: disable=import-error + import __pypy__ except ImportError: __pypy__ = None diff --git a/coverage/config.py b/coverage/config.py index 4d599ee7..ba288f05 100644 --- a/coverage/config.py +++ b/coverage/config.py @@ -7,7 +7,7 @@ from coverage.misc import CoverageException # In py3, # ConfigParser was renamed to the more-standard configparser try: - import configparser # pylint: disable=F0401 + import configparser except ImportError: import ConfigParser as configparser diff --git a/coverage/control.py b/coverage/control.py index 3e04bace..d1c0a245 100644 --- a/coverage/control.py +++ b/coverage/control.py @@ -23,7 +23,7 @@ from coverage.xmlreport import XmlReporter # Pypy has some unusual stuff in the "stdlib". Consider those locations # when deciding where the stdlib is. try: - import _structseq # pylint: disable=F0401 + import _structseq except ImportError: _structseq = None diff --git a/coverage/execfile.py b/coverage/execfile.py index 82cc2217..e7e20715 100644 --- a/coverage/execfile.py +++ b/coverage/execfile.py @@ -14,7 +14,6 @@ if importlib_util_find_spec: Returns the file path of the module, and the name of the enclosing package. """ - # pylint: disable=no-member try: spec = importlib_util_find_spec(modulename) except ImportError as err: diff --git a/coverage/parser.py b/coverage/parser.py index e7b9c029..a1e3a923 100644 --- a/coverage/parser.py +++ b/coverage/parser.py @@ -545,7 +545,7 @@ class ByteParser(object): chunks.append(chunk) # Give all the chunks a length. - chunks[-1].length = bc.next_offset - chunks[-1].byte # pylint: disable=W0631,C0301 + chunks[-1].length = bc.next_offset - chunks[-1].byte for i in range(len(chunks)-1): chunks[i].length = chunks[i+1].byte - chunks[i].byte @@ -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,E1101 + # pylint: disable=F0401,E0611 import distutils.core cur_dir = os.getcwd() os.chdir("tests/eggsrc") @@ -223,7 +223,7 @@ def print_banner(label): version = platform.python_version() if '__pypy__' in sys.builtin_module_names: - pypy_version = sys.pypy_version_info # pylint: disable=E1101 + pypy_version = sys.pypy_version_info version += " (pypy %s)" % ".".join(str(v) for v in pypy_version) which_python = os.path.relpath(sys.executable) @@ -20,10 +20,10 @@ profile=no # Add <file or directory> to the black list. It should be a base name, not a # path. You may set this option multiple times. -ignore=CVS +ignore= # Pickle collected data for later comparisons. -persistent=yes +persistent=no # Set the cache size for astng objects. cache-size=500 @@ -50,7 +50,9 @@ load-plugins= #disable-msg-cat= # Enable the message(s) with the given id(s). -#enable-msg= +enable= +# I0021: Useless suppression + I0021 # Disable the message(s) with the given id(s). disable= @@ -75,6 +77,8 @@ 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}) + [REPORTS] # set the output format. Available formats are text, parseable, colorized, msvs @@ -47,8 +47,8 @@ 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,F0401,C0301 -from distutils import errors # pylint: disable=E0611,F0401 +from distutils.command.build_ext import build_ext # pylint: disable=E0611 +from distutils import errors # pylint: disable=E0611 # 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 439493d1..1b38cce1 100644 --- a/tests/backtest.py +++ b/tests/backtest.py @@ -20,7 +20,7 @@ def run_command(cmd): stderr=subprocess.STDOUT ) output, _ = proc.communicate() - status = proc.returncode # pylint: disable=E1101 + status = proc.returncode # Get the output, and canonicalize it to strings with newlines. if not isinstance(output, str): diff --git a/tests/test_concurrency.py b/tests/test_concurrency.py index 6fbac4a6..02163d2f 100644 --- a/tests/test_concurrency.py +++ b/tests/test_concurrency.py @@ -10,17 +10,17 @@ from tests.coveragetest import CoverageTest # These libraries aren't always available, we'll skip tests if they aren't. try: - import eventlet # pylint: disable=import-error + import eventlet except ImportError: eventlet = None try: - import gevent # pylint: disable=import-error + import gevent except ImportError: gevent = None try: - import greenlet # pylint: disable=import-error + import greenlet except ImportError: greenlet = None diff --git a/tests/test_summary.py b/tests/test_summary.py index ce668f76..c8364ca5 100644 --- a/tests/test_summary.py +++ b/tests/test_summary.py @@ -201,7 +201,6 @@ class SummaryTest(CoverageTest): self.assertEqual(out, 'x\ny\n') report = self.report_from_command("coverage report --show-missing") - # pylint: disable=C0301 # Name Stmts Miss Branch BrPart Cover Missing # ------------------------------------------------------- # main 1 0 0 0 100% diff --git a/tests/test_templite.py b/tests/test_templite.py index aa697b78..b3e21e70 100644 --- a/tests/test_templite.py +++ b/tests/test_templite.py @@ -4,9 +4,7 @@ import re from coverage.templite import Templite, TempliteSyntaxError from tests.coveragetest import CoverageTest -# pylint: disable=W0612,E1101 -# Disable W0612 (Unused variable) and -# E1101 (Instance of 'foo' has no 'bar' member) +# pylint: disable=unused-variable class AnyOldObject(object): """Simple testing object. |