diff --git a/tools/idf_py_actions/diag_ext.py b/tools/idf_py_actions/diag_ext.py index 0b472311a3..8950d04fef 100644 --- a/tools/idf_py_actions/diag_ext.py +++ b/tools/idf_py_actions/diag_ext.py @@ -8,27 +8,29 @@ from typing import Optional from typing import Tuple import click + from idf_py_actions.tools import PropertyDict from idf_py_actions.tools import RunTool from idf_py_actions.tools import yellow_print -def diag(action: str, - ctx: click.core.Context, - args: PropertyDict, - debug: bool, - log_prefix: bool, - force: bool, - no_color: bool, - zip_directory: Optional[str], - list_recipes: bool, - check_recipes: bool, - cmdl_recipes: Tuple, - cmdl_tags: Tuple, - purge_file: Optional[str], - append: bool, - output: Optional[str]) -> None: - +def diag( + action: str, + ctx: click.core.Context, + args: PropertyDict, + debug: bool, + log_prefix: bool, + force: bool, + no_color: bool, + zip_directory: Optional[str], + list_recipes: bool, + check_recipes: bool, + cmdl_recipes: Tuple, + cmdl_tags: Tuple, + purge_file: Optional[str], + append: bool, + output: Optional[str], +) -> None: diag_args: list = [sys.executable, '-m', 'esp_idf_diag'] def add_common_arguments(diag_args: list) -> None: @@ -103,10 +105,14 @@ def diag(action: str, if args.port: diag_args += ['--port', args.port] else: - yellow_print( ( 'The target serial port is not specified, so ' - 'autodetection will be used. To set it manually, use ' - 'the "--port" option. Example: "idf.py --port ' - '/dev/ttyUSB0 diag".')) + yellow_print( + ( + 'The target serial port is not specified, so ' + 'autodetection will be used. To set it manually, use ' + 'the "--port" option. Example: "idf.py --port ' + '/dev/ttyUSB0 diag".' + ) + ) try: RunTool('idf_diag', diag_args, args.project_dir, hints=not args.no_hints)() @@ -168,24 +174,30 @@ def action_extensions(base_actions: Dict, project_path: str) -> Any: 'multiple': True, 'metavar': 'RECIPE', 'type': str, - 'help': ('Recipe to use. This option can be specified multiple times. ' - 'By default, all built-in recipes are used. RECIPE refers to ' - 'the recipe file path or the file name stem for built-in recipes.'), + 'help': ( + 'Recipe to use. This option can be specified multiple times. ' + 'By default, all built-in recipes are used. RECIPE refers to ' + 'the recipe file path or the file name stem for built-in recipes.' + ), }, { 'names': ['-t', '--tag', 'cmdl_tags'], 'multiple': True, 'metavar': 'TAG', 'type': str, - 'help': ('Consider only recipes containing TAG. This option can be specified ' - 'multiple times. By default, all recipes are used. Use -l/--list-recipes ' - 'option to see recipe TAG information.'), + 'help': ( + 'Consider only recipes containing TAG. This option can be specified ' + 'multiple times. By default, all recipes are used. Use -l/--list-recipes ' + 'option to see recipe TAG information.' + ), }, { 'names': ['-a', '--append'], 'is_flag': True, - 'help': ('Use recipes specified with the -r/--recipe option in ' - 'combination with the built-in recipes.'), + 'help': ( + 'Use recipes specified with the -r/--recipe option in ' + 'combination with the built-in recipes.' + ), }, { 'names': ['-f', '--force'], @@ -196,16 +208,18 @@ def action_extensions(base_actions: Dict, project_path: str) -> Any: 'names': ['-o', '--output'], 'metavar': 'PATH', 'type': str, - 'help': ('Diagnostic report directory PATH or zip file archive PATH. ' - 'If not specified, the report-UUID is used as the report directory, ' - 'and the report directory specified with the --zip option with a zip ' - 'extension is used for the zip file archive.') + 'help': ( + 'Diagnostic report directory PATH or zip file archive PATH. ' + 'If not specified, the report-UUID is used as the report directory, ' + 'and the report directory specified with the --zip option with a zip ' + 'extension is used for the zip file archive.' + ), }, { 'names': ['-p', '--purge', 'purge_file'], 'metavar': 'PATH', 'type': str, - 'help': ('Use a custom purge file to remove sensitive information from the report.') + 'help': ('Use a custom purge file to remove sensitive information from the report.'), }, ], },