Skip to content

Commit

Permalink
fix: undeprecate coverage annotate
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Dec 10, 2023
1 parent 05b47a3 commit e0a550b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ Unreleased
matching any of the lines, closing `issue 684`_. Thanks, `Jan Rusak,
Maciej Kowalczyk and Joanna Ejzel <pull 1705_>`_.

- The ``coverage annotate`` command used to announce that it would be removed
in a future version. Enough people got in touch to say that they use it, so
it will stay. Don't expect it to keep up with other new features though.

- Added new :ref:`debug options <cmd_run_debug>`:

- ``pytest`` writes the pytest test name into the debug output.
Expand Down
3 changes: 0 additions & 3 deletions coverage/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -1110,9 +1110,6 @@ def annotate(
See :meth:`report` for other arguments.
"""
print("The annotate command will be removed in a future version.")
print("Get in touch if you still use it: ned@nedbatchelder.com")

self._prepare_data_for_reporting()
with override_config(
self,
Expand Down
7 changes: 1 addition & 6 deletions tests/test_annotate.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,5 @@ def f(x):
cov = coverage.Coverage()
self.start_import_stop(cov, "mae")
cov.annotate()
assert self.stdout() == (
"1\n" +
"2\n" +
"The annotate command will be removed in a future version.\n" +
"Get in touch if you still use it: ned@nedbatchelder.com\n"
)
assert self.stdout() == "1\n2\n"
compare(gold_path("annotate/mae"), ".", "*,cover")

0 comments on commit e0a550b

Please sign in to comment.