Replies: 1 comment
-
|
Thanks, we'll fix this in a future refactor, this argument will become unsupported as already indicated in the API docstring. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
First Check
Example Code
Description
Observation
Since version
0.26.0(which vendored Click and restructuredTyperGroupunder PR #1774), settingchain=Trueon aTyperapp is silently accepted but has no effect. Chained command invocations fail withGot unexpected extra argument(s).However, the
chainparameter is still fully exposed on the public API (onTyper(),add_typer(), andTyperInfo), and its docstring misleadingly states that it is:Since command chaining is no longer supported after the Click vendoring refactor, passing
chain=Trueexplicitly should fail with a clearRuntimeErrorrather than failing silently at runtime, and the misleading docstrings should be corrected.Relating to the attached minimum reproducer:
Expected Behavior (e.g. Typer 0.25.1)
Both commands are executed sequentially:
A
B
exit_code: 0
Actual Behavior (Typer 0.26.0 - 0.26.8)
Silent failure of the chain; Click throws an "unexpected extra argument" usage error on the second command:
Proposed Solution / PR Preview
I have prepared a patch in my fork to:
chain(not theDefault(False)placeholder) inTyperInfo.__init__and raise a clear, helpfulRuntimeErroron instantiation.main.py to state chaining is unsupported and will raise an error. Alternatively remove it completely.Operating System
Linux
Operating System Details
openSUSE Slowroll
Project Version
0.26.0 through 0.26.8 (including master)
Python Version
3.13.13
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions