From c669060c45db5f5193dc4d681cbad972b9f6f740 Mon Sep 17 00:00:00 2001 From: Artur Shiriev Date: Mon, 19 Oct 2026 19:30:45 +0300 Subject: [PATCH 1/2] chore: upgrade to modern-di 4 via modern-di-typer 4 modern-di-typer 4's inject adds its own context parameter unless the function declares a typer.Context, so the use-case helper now takes ctx. --- pyproject.toml | 2 +- semvertag/__main__.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 139f69c..45a7c73 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,7 @@ dependencies = [ "rich>=10.11", "semver>=3", "pydantic-settings>=2", - "modern-di-typer>=3,<4", + "modern-di-typer>=4,<5", "httpx2>=2", "httpware[pydantic]>=0.18.0", ] diff --git a/semvertag/__main__.py b/semvertag/__main__.py index 0a32acd..b174932 100644 --- a/semvertag/__main__.py +++ b/semvertag/__main__.py @@ -135,6 +135,7 @@ def _main_callback( # noqa: PLR0913, PLR0917 @modern_di_typer.inject def _resolve_use_case( + _ctx: typer.Context, use_case: typing.Annotated[SemvertagUseCase, modern_di_typer.FromDI(SemvertagUseCase)], ) -> SemvertagUseCase: return use_case @@ -158,7 +159,7 @@ def _tag_command( ) -> None: output: Output = build_json_output(quiet=quiet) if json_flag else build_rich_output(quiet=quiet) try: - use_case = _resolve_use_case(ctx=ctx) + use_case = _resolve_use_case(ctx) use_case(output=output, dry_run=dry_run) except ImportError as exc: err = ConfigError(f"Required module unavailable: {exc}.") From f9a0822020fb18ca5216ba92f72041f196ada3da Mon Sep 17 00:00:00 2001 From: Artur Shiriev Date: Mon, 19 Oct 2026 19:41:45 +0300 Subject: [PATCH 2/2] build: raise typer and rich floors for modern-di-typer 4 modern-di-typer 4 needs typer>=0.26, which needs rich>=13.8. --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 45a7c73..96766de 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,8 +19,8 @@ classifiers = [ ] version = "0" dependencies = [ - "typer>=0.13", - "rich>=10.11", + "typer>=0.26", + "rich>=13.8", "semver>=3", "pydantic-settings>=2", "modern-di-typer>=4,<5",