diff --git a/docs_src/parameter_types/dict/tutorial001.py b/docs_src/parameter_types/dict/tutorial001.py index e4027719eb..2f0cd61559 100644 --- a/docs_src/parameter_types/dict/tutorial001.py +++ b/docs_src/parameter_types/dict/tutorial001.py @@ -1,7 +1,7 @@ import typer -def main(user_info: dict = typer.Option({})): +def main(user_info: dict = typer.Option()): print(f"Name: {user_info.get('name', 'Unknown')}") print(f"User attributes: {sorted(user_info.keys())}") diff --git a/docs_src/parameter_types/dict/tutorial001_an.py b/docs_src/parameter_types/dict/tutorial001_an.py index f876c255d1..92b507a322 100644 --- a/docs_src/parameter_types/dict/tutorial001_an.py +++ b/docs_src/parameter_types/dict/tutorial001_an.py @@ -2,7 +2,7 @@ from typing_extensions import Annotated -def main(user_info: Annotated[dict, typer.Option()] = {}): +def main(user_info: Annotated[dict, typer.Option()]): print(f"Name: {user_info.get('name', 'Unknown')}") print(f"User attributes: {sorted(user_info.keys())}")