Skip to content

Commit

Permalink
Use Field instead of FieldInfo. Slightly better display
Browse files Browse the repository at this point in the history
  • Loading branch information
mpkocher committed Sep 20, 2024
1 parent a8a7242 commit 96373cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pydantic_cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,10 @@ def _add_pydantic_field_to_parser(
is_required = False

# Delete cli and json_schema_extras metadata isn't in FieldInfo and won't be displayed
# Not sure this is the correct, or expected behavior.
# Not sure if this is the correct, or expected behavior.
cfield_info = deepcopy(field_info)
cfield_info.json_schema_extra = None
help_ = repr(cfield_info)
help_ = f"Field({cfield_info.__repr_str__(", ")})"

# log.debug(f"Creating Argument Field={field_id} opts:{cli_short_long}, allow_none={field.allow_none} default={default_value} type={field.type_} required={is_required} dest={field_id} desc={description}")

Expand Down

0 comments on commit 96373cc

Please sign in to comment.