diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2022-05-30 12:42:25 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2022-05-30 12:42:25 -0400 |
commit | 73f4a6787b69138f5fe3e682a5cbb08432919e72 (patch) | |
tree | e583be5fdcf919f05435321431a370c1c2b483bf /coverage/pytracer.py | |
parent | f40da644142bd89092e81ef72beaf66687fe9a15 (diff) | |
download | python-coveragepy-git-73f4a6787b69138f5fe3e682a5cbb08432919e72.tar.gz |
docs: mentioned pull #1388
Diffstat (limited to 'coverage/pytracer.py')
-rw-r--r-- | coverage/pytracer.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/coverage/pytracer.py b/coverage/pytracer.py index 4389c9ed..4f138074 100644 --- a/coverage/pytracer.py +++ b/coverage/pytracer.py @@ -67,11 +67,10 @@ class PyTracer: # On exit, self.in_atexit = True atexit.register(setattr, self, 'in_atexit', True) - # cache a bound method on the instance, so that we don't have to - # re-create a bound method object all the time + # Cache a bound method on the instance, so that we don't have to + # re-create a bound method object all the time. self._cached_bound_method_trace = self._trace - def __repr__(self): return "<PyTracer at 0x{:x}: {} lines in {} files>".format( id(self), @@ -289,7 +288,7 @@ class PyTracer: dont_warn = (env.PYPY and env.PYPYVERSION >= (5, 4) and self.in_atexit and tf is None) if (not dont_warn) and tf != self._cached_bound_method_trace: # pylint: disable=comparison-with-callable self.warn( - f"Trace function changed, data is likely wrong: " + "Trace function changed, data is likely wrong: " + f"{tf!r} != {self._cached_bound_method_trace!r}", slug="trace-changed", ) |