Skip to content

Commit

Permalink
feat: add types to help message
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnacioHeredia authored and alvarolopez committed Jul 19, 2024
1 parent 77d40b4 commit 0749057
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion deepaas/cmd/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,14 @@ def _fields_to_dict(fields_in):
if "enum" in val.metadata.keys():
val_help += f"\nChoices: {val.metadata['enum']}"

val_help += f"\nType: {param['type'].__name__}"
if val_type is fields.Field:
val_help += "\nType: FILEPATH"
val_help += " (filepath)"

if val_req:
val_help += "\n*Required*"

val_help = val_help.lstrip('\n') # remove escape when no description found
param["help"] = val_help

dict_out[key] = param
Expand Down

0 comments on commit 0749057

Please sign in to comment.