Skip to content

Commit

Permalink
finish #1613
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Apr 26, 2023
1 parent 15002fe commit 38c18e2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,16 @@ development at the same time, such as 4.5.x and 5.0.
Unreleased
----------

- When the HTML report location is printed to the terminal, it's now a
terminal-compatible URL, so that you can click the location to open the HTML
file in your browser. Thanks, `Ricardo Newbery <pull 1613_>`_.

- Docs: a new :ref:`Migrating page <migrating>` with details about how to
migrate between major versions of coverage.py. It currently covers the
wildcard changes in 7.x. Thanks, `Brian Grohe <pull 1610_>`_.

.. _pull 1610: https://github.com/nedbat/coveragepy/pull/1610
.. _pull 1613: https://github.com/nedbat/coveragepy/pull/1613

.. scriv-start-here
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ Peter Ebden
Peter Portante
Phebe Polk
Reya B
Ricardo Newbery
Rodrigue Cloutier
Roger Hu
Ross Lawley
Expand Down
8 changes: 1 addition & 7 deletions coverage/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

from __future__ import annotations

import os
import sys

from typing import Callable, Iterable, Iterator, IO, Optional, Tuple, TYPE_CHECKING
Expand Down Expand Up @@ -59,12 +58,7 @@ def render_report(
try:
ret = reporter.report(morfs, outfile=outfile)
if file_to_close is not None:
if sys.stdout.isatty():
file_path = f"file://{os.path.abspath(output_path)}"
print_path = f"\033]8;;{file_path}\a{output_path}\033]8;;\a"
else:
print_path = output_path
msgfn(f"Wrote {reporter.report_type} to {print_path}")
msgfn(f"Wrote {reporter.report_type} to {output_path}")
delete_file = False
return ret
finally:
Expand Down

0 comments on commit 38c18e2

Please sign in to comment.