Repository navigation
bug: Variadic list typer.Argument with default value broken between 0.25 and 0.26 #1811
Answered
by
svlandeg
tchervychek
asked this question in
Questions
First Check
Example Codefrom typing import Annotated
import typer
app = typer.Typer()
@app.command()
def run(
tests: Annotated[list[str], typer.Argument()] = ["foo"],
) -> None:
print(tests)
def main():
app()
if __name__ == "__main__":
main()DescriptionSee the repro. Argument $ uv run --quiet --with typer==0.25.0 -- python repro.py
['foo']versus $ uv run --quiet --with typer==0.26.0 -- python repro.py
[]I could not find any documentation stating that this behaviour is not supported or that this is a breaking change going from 0.25 to 0.26. Operating SystemLinux Operating System DetailsUbuntu 24.04 (running in WSL) Project Version0.26.4 Python VersionPython 3.12.3 Additional ContextNo response |
Answered by
svlandeg
Jun 2, 2026
Replies: 4 comments
|
That looks like a potential bug. Thanks for the report, I'll look into it! |
0 replies
|
Confirmed that this is a bug, I'll push a fix later today! |
0 replies
|
Thanks! |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PR: #1821
Released in Typer 0.26.6 🎉