Skip to content

Commit

Permalink
style: fix black
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnacioHeredia authored and alvarolopez committed Aug 6, 2024
1 parent e59e6f6 commit c5a8512
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions deepaas/cmd/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def _fields_to_dict(fields_in):
elif val_type is fields.Dict:
val_help += '\nType: dict, enclosed as string: "{...}"'
elif val_type in [fields.Bool, fields.Boolean]:
val_help += '\nType: bool'
val_help += "\nType: bool"
else:
val_help += f"\nType: {param['type'].__name__}"
if val_type is fields.Field:
Expand All @@ -139,7 +139,7 @@ def _fields_to_dict(fields_in):
if "enum" in val.metadata.keys():
val_help += f"\nChoices: {val.metadata['enum']}"

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

dict_out[key] = param
Expand Down Expand Up @@ -208,15 +208,16 @@ def _get_file_args(fields_in):

# Find which of the arguments are going to be files
file_args = {}
file_args['predict'] = _get_file_args(model_obj.get_predict_args())
file_args['train'] = _get_file_args(model_obj.get_train_args())
file_args["predict"] = _get_file_args(model_obj.get_predict_args())
file_args["train"] = _get_file_args(model_obj.get_train_args())


# Function to add later these arguments to CONF via SubCommandOpt
def _add_methods(subparsers):
"""Function to add argparse subparsers via SubCommandOpt (see below)
for DEEPaaS methods get_metadata, warm, predict, train
"""

# Use RawTextHelpFormatter to allow for line breaks in argparse help messages.
def help_formatter(prog):
return argparse.RawTextHelpFormatter(prog, max_help_position=10)
Expand Down

0 comments on commit c5a8512

Please sign in to comment.