From cb432180327b5bebf5b02fdae78eee37686fda0f Mon Sep 17 00:00:00 2001 From: Michel Albert Date: Thu, 2 May 2024 12:20:24 +0200 Subject: [PATCH 1/2] Fix regression --- src/gouge/colourcli.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gouge/colourcli.py b/src/gouge/colourcli.py index c79d698..ad2fcce 100644 --- a/src/gouge/colourcli.py +++ b/src/gouge/colourcli.py @@ -109,8 +109,10 @@ def __init__( self.pre_formatters = pre_formatters or {} if (Path.cwd() / "src").exists(): self.highlighted_path = (Path.cwd() / "src").absolute() - else: + elif highlighted_path is not None: self.highlighted_path = (highlighted_path).absolute() + else: + self.highlighted_path = highlighted_path def format(self, record: LogRecord) -> str: if record.levelno <= logging.DEBUG: From df97bad3231272b6ee9b88e9709e956684496533 Mon Sep 17 00:00:00 2001 From: Michel Albert Date: Thu, 2 May 2024 12:21:05 +0200 Subject: [PATCH 2/2] Version bumped to 2.2.4 --- docs/changelog.rst | 2 ++ pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 5b36a01..444c01c 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -23,6 +23,8 @@ Version 2.2 * [2.2.3] - fix: Path highlighting in exception messages should now work with absolute paths +* [2.2.4] - fix: regression introduced in 2.23 + Version 2.1 ----------- diff --git a/pyproject.toml b/pyproject.toml index 531ac8d..e39542f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "gouge" -version = "2.2.3" +version = "2.2.4" authors = [ {name = "Michel Albert", email = "michel@albert.lu"}, ]