summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coverage/debug.py10
-rw-r--r--coverage/results.py4
-rw-r--r--coverage/sqldata.py6
3 files changed, 10 insertions, 10 deletions
diff --git a/coverage/debug.py b/coverage/debug.py
index 4286bc50..eca1a5a4 100644
--- a/coverage/debug.py
+++ b/coverage/debug.py
@@ -30,7 +30,7 @@ FORCED_DEBUG_FILE = None
class DebugControl:
"""Control and output for debugging."""
- show_repr_attr = False # For SimpleReprMixin
+ show_repr_attr = False # For AutoReprMixin
def __init__(self, options, output):
"""Configure the options and output file for debugging."""
@@ -197,16 +197,16 @@ def add_pid_and_tid(text):
return text
-class SimpleReprMixin:
- """A mixin implementing a simple __repr__."""
- simple_repr_ignore = ['simple_repr_ignore', '$coverage.object_id']
+class AutoReprMixin:
+ """A mixin implementing an automatic __repr__ for debugging."""
+ auto_repr_ignore = ['auto_repr_ignore', '$coverage.object_id']
def __repr__(self):
show_attrs = (
(k, v) for k, v in self.__dict__.items()
if getattr(v, "show_repr_attr", True)
and not callable(v)
- and k not in self.simple_repr_ignore
+ and k not in self.auto_repr_ignore
)
return "<{klass} @0x{id:x} {attrs}>".format(
klass=self.__class__.__name__,
diff --git a/coverage/results.py b/coverage/results.py
index 79439fd9..493d2fc8 100644
--- a/coverage/results.py
+++ b/coverage/results.py
@@ -5,7 +5,7 @@
import collections
-from coverage.debug import SimpleReprMixin
+from coverage.debug import AutoReprMixin
from coverage.exceptions import ConfigError
from coverage.misc import contract, nice_pair
@@ -168,7 +168,7 @@ class Analysis:
return stats
-class Numbers(SimpleReprMixin):
+class Numbers(AutoReprMixin):
"""The numerical results of measuring coverage.
This holds the basic statistics from `Analysis`, and is used to roll
diff --git a/coverage/sqldata.py b/coverage/sqldata.py
index 68663715..f1b192d1 100644
--- a/coverage/sqldata.py
+++ b/coverage/sqldata.py
@@ -18,7 +18,7 @@ import textwrap
import threading
import zlib
-from coverage.debug import NoDebugging, SimpleReprMixin, clipped_repr
+from coverage.debug import NoDebugging, AutoReprMixin, clipped_repr
from coverage.exceptions import CoverageException, DataError
from coverage.files import PathAliases
from coverage.misc import contract, file_be_gone, isolate_module
@@ -103,7 +103,7 @@ CREATE TABLE tracer (
);
"""
-class CoverageData(SimpleReprMixin):
+class CoverageData(AutoReprMixin):
"""Manages collected coverage data, including file storage.
This class is the public supported API to the data that coverage.py
@@ -1040,7 +1040,7 @@ def filename_suffix(suffix):
return suffix
-class SqliteDb(SimpleReprMixin):
+class SqliteDb(AutoReprMixin):
"""A simple abstraction over a SQLite database.
Use as a context manager, then you can use it like a