fix: resolve lifecycle values from Typer context - #364
codeforester wants to merge 2 commits into
Conversation
| except ImportError: | ||
| pass | ||
| else: | ||
| from ._click_compat import dialect_for_typer |
There was a problem hiding this comment.
Reuse/altitude: this new Typer-dialect context resolution (private typer import, get_current_context/globals fallback dance) is hand-rolled inline here instead of being added to _click_compat.py, which this codebase already uses as the single place for dialect-crossing/private-Typer-import logic per its own module docstring. The next caller needing "the active context regardless of dialect" will either duplicate this or diverge from it.
|
Additional finding (file not touched by this diff, so not postable as an inline comment):
|
Summary
Closes #356
Validation
uv run --extra dev --extra typer --extra quality python -m pytest tests/test_typer_adapter.py tests/test_lifecycle_options.py -quv run --extra dev --extra typer --extra quality python -m mypy --strict lib/python/base_cli/lifecycle_options.pygit diff --check