Repository navigation
chore: upgrade to modern-di 4 - #104
Merged
Merged
Conversation
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.
modern-di-typer 4 needs typer>=0.26, which needs rich>=13.8.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves semvertag from modern-di 3 to 4 by bumping
modern-di-typerto>=4,<5. The lock resolves modern-di 4.3.0 and modern-di-typer 4.0.3.Changes
pyproject.toml:modern-di-typer>=4,<5.pyproject.toml: thetyperfloor goes from 0.13 to 0.26, which modern-di-typer 4 requires, and therichfloor from 10.11 to 13.8, which typer 0.26 requires. The floors job failed to resolve without them.semvertag/__main__.py:_resolve_use_casedeclares atyper.Contextparameter, and_tag_commandpassesctxpositionally. modern-di-typer 4's@injectadds a hidden_modern_di_typer_ctxparameter when the function has notyper.Contextof its own. The old_resolve_use_case(ctx=ctx)call then failed withmissing a required argument: '_modern_di_typer_ctx', which broke 32 CLI tests.ioc.pyneeds no change. TheContextProvider(Settings)value is set in the callback before anything resolves it, which 4.x requires.Testing
The floors job (lowest direct versions) passes locally on 3.11 and 3.14.
just test-ci: 500 passed, 100% coverage.just lintis clean.