Skip to content

test: read the --with help off its declaration, not through typer - #634

Open
holmboe wants to merge 1 commit into
mainfrom
test-with-option-no-typer-internals
Open

holmboe wants to merge 1 commit into
mainfrom
test-with-option-no-typer-internals

Conversation

@holmboe

@holmboe holmboe commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Why

The lock file maintenance in #616 resolves typer 0.29.1, and every leg of Tests fails on it: tests/test_with_option_parity.py imports typer.main.get_click_param, which was never public and is gone in 0.29. phabfive itself is unaffected - the CLI, mypy and the other 6900 tests pass on that lock.

What

The test only compared help strings, and typer hands an option's help to click unchanged. So it now compares each command's --with help with with_spec_option(kind).help directly, which asks the same question without typer internals.

Testing

tests/test_with_option_parity.py passes on the current lock (typer 0.27.3) and on #616's lock (typer 0.29.1), where the full suite also passes (6918 passed). The two kinds' help strings differ, so a command carrying the wrong kind's help still fails.

🤖 Generated with Claude Code

The parity test built a click parameter with typer.main.get_click_param
to compare help strings. That function was never public, and typer 0.29
removed it, so the test fails on the refreshed lock file while phabfive
itself runs fine. Typer hands an option's help to click unchanged, so
the declaration's own help is the same comparison on every version.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant