1. Ned Batchelder
  2. coverage.py

Commits

Ned Batchelder  committed 0a2f56d

Pylint 0.23.0 'deprecated' disable-msg.

  • Participants
  • Parent commits 357e4b5
  • Branches default

Comments (0)

Files changed (25)

File .pylintrc

View file
 #enable-msg=
 
 # Disable the message(s) with the given id(s).
-disable-msg= 
+disable= 
 # Messages that are just silly:
 #   I0011:106: Locally disabling E1101
 #   W0122: 30:run_python_file: Use of the exec statement
 #   W0603: 28:call_singleton_method: Using the global statement
 #   W0703:133:CoverageData._read_file: Catch "Exception"
     I0011,W0122,W0142,W0232,C0323,C0324,W0603,W0703,
-
 # Messages that may be silly:
 #   R0201: 42:Tracer.stop: Method could be a function
 #   C0321: 80:CodeUnit.__lt__: More than one statement on a single line    
 #   W0403:  4: Relative import 'coveragetest'
 #   E1103: 26:RunTests.test_run_python_file: Instance of 'file' has no 'getvalue' member (but some types could not be inferred)
     R0201,C0321,R0401,W0403,E1103,
-
 # 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}$)
-    C0103
+#   W0404: 22:run_tests_with_coverage: Reimport 'coverage' (imported line 18)
+    C0103,W0404
 
 [REPORTS]
 

File Makefile

View file
 LINTABLE = coverage setup.py test
 
 lint:
-	-python -x /Python25/Scripts/pylint.bat --rcfile=.pylintrc $(LINTABLE)
-	python /Python25/Lib/tabnanny.py $(LINTABLE)
+	-pylint --rcfile=.pylintrc $(LINTABLE)
+	python -m tabnanny $(LINTABLE)
 	python checkeol.py
 
 pep8:

File coverage/backward.py

View file
 """Add things to old Pythons so I can pretend they are newer."""
 
 # This file does lots of tricky stuff, so disable a bunch of lintisms.
-# pylint: disable-msg=F0401,W0611,W0622
+# pylint: disable=F0401,W0611,W0622
 # F0401: Unable to import blah
 # W0611: Unused import blah
 # W0622: Redefining built-in blah

File coverage/cmdline.py

View file
 
 import optparse, re, sys, traceback
 
-from coverage.backward import sorted                # pylint: disable-msg=W0622
+from coverage.backward import sorted                # pylint: disable=W0622
 from coverage.execfile import run_python_file
 from coverage.misc import CoverageException, ExceptionDuringRun
 

File coverage/config.py

View file
 """Config file for coverage.py"""
 
 import os
-from coverage.backward import configparser          # pylint: disable-msg=W0622
+from coverage.backward import configparser          # pylint: disable=W0622
 
 
 class CoverageConfig(object):

File coverage/control.py

View file
     # To log what should_trace returns, change this to "if 1:"
     if 0:
         _real_should_trace = _should_trace
-        def _should_trace(self, filename, frame):   # pylint: disable-msg=E0102
+        def _should_trace(self, filename, frame):   # pylint: disable=E0102
             """A logging decorator around the real _should_trace function."""
             ret = self._real_should_trace(filename, frame)
             print("should_trace: %r -> %r" % (filename, ret))
         return Analysis(self, it)
 
     def report(self, morfs=None, show_missing=True, ignore_errors=None,
-                file=None,                          # pylint: disable-msg=W0622
+                file=None,                          # pylint: disable=W0622
                 omit=None, include=None
                 ):
         """Write a summary report to `file`.

File coverage/data.py

View file
 
 import os
 
-from coverage.backward import pickle, sorted        # pylint: disable-msg=W0622
+from coverage.backward import pickle, sorted        # pylint: disable=W0622
 
 
 class CoverageData(object):

File coverage/html.py

View file
 
 import os, re, shutil
 
-from coverage import __url__, __version__           # pylint: disable-msg=W0611
+from coverage import __url__, __version__           # pylint: disable=W0611
 from coverage.misc import CoverageException
 from coverage.phystokens import source_token_lines
 from coverage.report import Reporter
 
 # Disable pylint msg W0612, because a bunch of variables look unused, but
 # they're accessed in a Templite context via locals().
-# pylint: disable-msg=W0612
+# pylint: disable=W0612
 
 def data_filename(fname):
     """Return the path to a data file of ours."""

File coverage/parser.py

View file
 
 import glob, opcode, os, re, sys, token, tokenize
 
-from coverage.backward import set, sorted, StringIO # pylint: disable-msg=W0622
+from coverage.backward import set, sorted, StringIO # pylint: disable=W0622
 from coverage.backward import open_source
 from coverage.bytecode import ByteCodes, CodeObjects
 from coverage.misc import nice_pair, CoverageException, NoSource, expensive

File coverage/phystokens.py

View file
 """Better tokenizing for coverage.py."""
 
 import keyword, re, token, tokenize
-from coverage.backward import StringIO              # pylint: disable-msg=W0622
+from coverage.backward import StringIO              # pylint: disable=W0622
 
 def phys_tokens(toks):
     """Return all physical tokens, even line continuations.

File coverage/results.py

View file
 
 import os
 
-from coverage.backward import set, sorted           # pylint: disable-msg=W0622
+from coverage.backward import set, sorted           # pylint: disable=W0622
 from coverage.misc import format_lines, NoSource
 from coverage.parser import CodeParser
 

File coverage/xmlreport.py

View file
 import xml.dom.minidom
 
 from coverage import __url__, __version__
-from coverage.backward import sorted            # pylint: disable-msg=W0622
+from coverage.backward import sorted            # pylint: disable=W0622
 from coverage.report import Reporter
 
 def rate(hit, num):

File setup.py

View file
 use_setuptools()
 
 from setuptools import setup
-from distutils.core import Extension    # pylint: disable-msg=E0611,F0401
+from distutils.core import Extension    # pylint: disable=E0611,F0401
 
 # Get or massage our metadata.
 

File test/backtest.py

View file
 """Add things to old Pythons so I can pretend they are newer, for tests."""
 
-# pylint: disable-msg=W0622
+# pylint: disable=W0622
 # (Redefining built-in blah)
 # The whole point of this file is to redefine built-ins, so shut up about it.
 

File test/backunittest.py

View file
 
 import difflib, re, sys, unittest
 
-from coverage.backward import set                   # pylint: disable-msg=W0622
+from coverage.backward import set                   # pylint: disable=W0622
 
 
 def _need(method):

File test/coveragetest.py

View file
 import imp, os, random, shlex, shutil, sys, tempfile, textwrap
 
 import coverage
-from coverage.backward import sorted, StringIO      # pylint: disable-msg=W0622
+from coverage.backward import sorted, StringIO      # pylint: disable=W0622
 from backtest import run_command
 from backunittest import TestCase
 
             if suff[0] == '.py':
                 break
         try:
-            # pylint: disable-msg=W0631
+            # pylint: disable=W0631
             # (Using possibly undefined loop variable 'suff')
             mod = imp.load_module(modname, f, modfile, suff)
         finally:

File test/meta_coverage.py

View file
             if hasattr(mod, '__file__') and mod.__file__.startswith(covdir):
                 covmods[name] = mod
                 del sys.modules[name]
-    import coverage     # don't warn about re-import: pylint: disable-msg=W0404
+    import coverage     # don't warn about re-import: pylint: disable=W0404
     #sys.modules.update(covmods)
 
     # Run nosetests, with the arguments from our command line.

File test/test_api.py

View file
         """
         cov = coverage.coverage(**kwargs)
         cov.start()
-        import usepkgs                      # pylint: disable-msg=F0401,W0612
+        import usepkgs                      # pylint: disable=F0401,W0612
         cov.stop()
         return cov.data.summary()
 

File test/test_cmdline.py

View file
         """Fake coverage().data.has_arcs()"""
         return False
 
-    def summary(self, fullpath):                    # pylint: disable-msg=W0613
+    def summary(self, fullpath):                    # pylint: disable=W0613
         """Fake coverage().data.summary()"""
         return self._summary
 

File test/test_codeunit.py

View file
 sys.path.insert(0, os.path.split(__file__)[0]) # Force relative import for Py3k
 from coveragetest import CoverageTest
 
-# pylint: disable-msg=F0401
+# pylint: disable=F0401
 # Unable to import 'aa' (No module named aa)
 
 class CodeUnitTest(CoverageTest):

File test/test_farm.py

View file
 import difflib, filecmp, fnmatch, glob, os, re, shutil, sys
 
 sys.path.insert(0, os.path.split(__file__)[0]) # Force relative import for Py3k
-from backtest import run_command, execfile          # pylint: disable-msg=W0622
+from backtest import run_command, execfile          # pylint: disable=W0622
 
 
 def test_farm(clean_only=False):

File test/test_files.py

View file
 
 from coverage.files import FileLocator, TreeMatcher, FnmatchMatcher
 from coverage.files import find_python_files
-from coverage.backward import set                   # pylint: disable-msg=W0622
+from coverage.backward import set                   # pylint: disable=W0622
 
 sys.path.insert(0, os.path.split(__file__)[0]) # Force relative import for Py3k
 from coveragetest import CoverageTest

File test/test_summary.py

View file
     def test_empty_files(self):
         cov = coverage.coverage()
         cov.start()
-        import usepkgs                      # pylint: disable-msg=F0401,W0612
+        import usepkgs                      # pylint: disable=F0401,W0612
         cov.stop()
 
         repout = StringIO()

File test/test_templite.py

View file
 from coverage.templite import Templite
 import unittest
 
-# pylint: disable-msg=W0612,E1101
+# pylint: disable=W0612,E1101
 # Disable W0612 (Unused variable) and
 # E1101 (Instance of 'foo' has no 'bar' member)
 

File test/test_testing.py

View file
 from backunittest import TestCase
 from coveragetest import CoverageTest
 
-from coverage.backward import set                   # pylint: disable-msg=W0622
+from coverage.backward import set                   # pylint: disable=W0622
 
 class TestingTest(TestCase):
     """Tests of helper methods on `backunittest.TestCase`."""