Skip to content

Commit

Permalink
remove default
Browse files Browse the repository at this point in the history
  • Loading branch information
svlandeg committed Jan 10, 2025
1 parent 966206d commit 7caf522
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs_src/parameter_types/dict/tutorial001.py
Original file line number Diff line number Diff line change
@@ -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())}")

Expand Down
2 changes: 1 addition & 1 deletion docs_src/parameter_types/dict/tutorial001_an.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())}")

Expand Down

0 comments on commit 7caf522

Please sign in to comment.