Skip to content

Commit 9c4b473

Browse files
committed
Fix typer conflict with click 8.2.1
Typer 0.9.4 is not compatible with click 8.2.1 due to a missing positional argument in rich_utils.py:370, so update Typer to the latest version. This introduced a breaking change, as the rich_utils module imported to override the dim text in help messages is now lazy-loaded [1]. The solution is to directly import rich_utils from typer. Typer was not updated due to using the caret requirement [2]. The constraint stays for now, considering potential breaking changes introduced in new versions. However, the constraint on lief changes ~=0.16, a compatible release [3] allowing >=0.16.0 and <1.0.0. [1]: fastapi/typer#1128 [2]: https://python-poetry.org/docs/dependency-specification/#caret-requirements
1 parent 4b6bb18 commit 9c4b473

File tree

3 files changed

+237
-72
lines changed

3 files changed

+237
-72
lines changed

crypto_condor/cli/__init__.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
"""CLI module for crypto-condor."""
22

3-
import typer
3+
from typer import rich_utils
44

55
# Hacky fix for dull help text on some terminals.
66
# https://github.com/tiangolo/typer/issues/437
7-
typer.rich_utils.STYLE_HELPTEXT_FIRST_LINE = "bold"
8-
typer.rich_utils.STYLE_HELPTEXT = ""
7+
# Update 08/09/2025: rich_utils is now lazy-loaded (see
8+
# https://github.com/fastapi/typer/pull/1128) so we have to explicitly import it from
9+
# typer. Override works the same way as before.
10+
rich_utils.STYLE_HELPTEXT_FIRST_LINE = "bold"
11+
rich_utils.STYLE_HELPTEXT = ""

0 commit comments

Comments
 (0)