summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coverage/annotate.py1
-rw-r--r--coverage/misc.py6
-rw-r--r--coverage/python.py1
3 files changed, 2 insertions, 6 deletions
diff --git a/coverage/annotate.py b/coverage/annotate.py
index dd92e6fa..91bbe670 100644
--- a/coverage/annotate.py
+++ b/coverage/annotate.py
@@ -4,7 +4,6 @@ import io
import os
import re
-from coverage import env
from coverage.report import Reporter
class AnnotateReporter(Reporter):
diff --git a/coverage/misc.py b/coverage/misc.py
index 6131ec2a..0dad0559 100644
--- a/coverage/misc.py
+++ b/coverage/misc.py
@@ -11,10 +11,8 @@ from coverage.backward import string_class, to_bytes, unicode_class
# Use PyContracts for assertion testing on parameters and returns, but only if
# we are running our own test suite.
-contract = None
-
if env.TESTING:
- from contracts import contract
+ from contracts import contract # pylint: disable=unused-import
from contracts import new_contract
# Define contract words that PyContract doesn't have.
@@ -25,7 +23,7 @@ if env.TESTING:
else:
# We aren't using real PyContracts, so just define a no-op decorator as a
# stunt double.
- def contract(**unused): # pylint: disable=function-redefined
+ def contract(**unused):
"""Dummy no-op implementation of `contract`."""
return lambda func: func
diff --git a/coverage/python.py b/coverage/python.py
index faa26ffc..69823da7 100644
--- a/coverage/python.py
+++ b/coverage/python.py
@@ -4,7 +4,6 @@ import os.path
import zipimport
from coverage import env
-from coverage.backward import unicode_class
from coverage.files import FileLocator
from coverage.misc import contract, NoSource, join_regex
from coverage.parser import PythonParser