From c5a85127935b774531244be469825bf286ec599d Mon Sep 17 00:00:00 2001 From: Ignacio Heredia Date: Fri, 17 May 2024 11:59:20 +0200 Subject: [PATCH] style: fix black --- deepaas/cmd/cli.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/deepaas/cmd/cli.py b/deepaas/cmd/cli.py index 8e0bd945..bbb68dc2 100644 --- a/deepaas/cmd/cli.py +++ b/deepaas/cmd/cli.py @@ -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: @@ -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 @@ -208,8 +208,8 @@ 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 @@ -217,6 +217,7 @@ 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)