Skip to content

Commit ef9e762

Browse files
committed
fix(diag): ruff-format fixes from pre-commit
Signed-off-by: Frantisek Hrbata <[email protected]>
1 parent b2da8aa commit ef9e762

File tree

1 file changed

+47
-33
lines changed

1 file changed

+47
-33
lines changed

tools/idf_py_actions/diag_ext.py

Lines changed: 47 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,29 @@
88
from typing import Tuple
99

1010
import click
11+
1112
from idf_py_actions.tools import PropertyDict
1213
from idf_py_actions.tools import RunTool
1314
from idf_py_actions.tools import yellow_print
1415

1516

16-
def diag(action: str,
17-
ctx: click.core.Context,
18-
args: PropertyDict,
19-
debug: bool,
20-
log_prefix: bool,
21-
force: bool,
22-
no_color: bool,
23-
zip_directory: Optional[str],
24-
list_recipes: bool,
25-
check_recipes: bool,
26-
cmdl_recipes: Tuple,
27-
cmdl_tags: Tuple,
28-
purge_file: Optional[str],
29-
append: bool,
30-
output: Optional[str]) -> None:
31-
17+
def diag(
18+
action: str,
19+
ctx: click.core.Context,
20+
args: PropertyDict,
21+
debug: bool,
22+
log_prefix: bool,
23+
force: bool,
24+
no_color: bool,
25+
zip_directory: Optional[str],
26+
list_recipes: bool,
27+
check_recipes: bool,
28+
cmdl_recipes: Tuple,
29+
cmdl_tags: Tuple,
30+
purge_file: Optional[str],
31+
append: bool,
32+
output: Optional[str],
33+
) -> None:
3234
diag_args: list = [sys.executable, '-m', 'esp_idf_diag']
3335

3436
def add_common_arguments(diag_args: list) -> None:
@@ -103,10 +105,14 @@ def add_recipe_arguments(diag_args: list) -> None:
103105
if args.port:
104106
diag_args += ['--port', args.port]
105107
else:
106-
yellow_print( ( 'The target serial port is not specified, so '
107-
'autodetection will be used. To set it manually, use '
108-
'the "--port" option. Example: "idf.py --port '
109-
'/dev/ttyUSB0 diag".'))
108+
yellow_print(
109+
(
110+
'The target serial port is not specified, so '
111+
'autodetection will be used. To set it manually, use '
112+
'the "--port" option. Example: "idf.py --port '
113+
'/dev/ttyUSB0 diag".'
114+
)
115+
)
110116

111117
try:
112118
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:
168174
'multiple': True,
169175
'metavar': 'RECIPE',
170176
'type': str,
171-
'help': ('Recipe to use. This option can be specified multiple times. '
172-
'By default, all built-in recipes are used. RECIPE refers to '
173-
'the recipe file path or the file name stem for built-in recipes.'),
177+
'help': (
178+
'Recipe to use. This option can be specified multiple times. '
179+
'By default, all built-in recipes are used. RECIPE refers to '
180+
'the recipe file path or the file name stem for built-in recipes.'
181+
),
174182
},
175183
{
176184
'names': ['-t', '--tag', 'cmdl_tags'],
177185
'multiple': True,
178186
'metavar': 'TAG',
179187
'type': str,
180-
'help': ('Consider only recipes containing TAG. This option can be specified '
181-
'multiple times. By default, all recipes are used. Use -l/--list-recipes '
182-
'option to see recipe TAG information.'),
188+
'help': (
189+
'Consider only recipes containing TAG. This option can be specified '
190+
'multiple times. By default, all recipes are used. Use -l/--list-recipes '
191+
'option to see recipe TAG information.'
192+
),
183193
},
184194
{
185195
'names': ['-a', '--append'],
186196
'is_flag': True,
187-
'help': ('Use recipes specified with the -r/--recipe option in '
188-
'combination with the built-in recipes.'),
197+
'help': (
198+
'Use recipes specified with the -r/--recipe option in '
199+
'combination with the built-in recipes.'
200+
),
189201
},
190202
{
191203
'names': ['-f', '--force'],
@@ -196,16 +208,18 @@ def action_extensions(base_actions: Dict, project_path: str) -> Any:
196208
'names': ['-o', '--output'],
197209
'metavar': 'PATH',
198210
'type': str,
199-
'help': ('Diagnostic report directory PATH or zip file archive PATH. '
200-
'If not specified, the report-UUID is used as the report directory, '
201-
'and the report directory specified with the --zip option with a zip '
202-
'extension is used for the zip file archive.')
211+
'help': (
212+
'Diagnostic report directory PATH or zip file archive PATH. '
213+
'If not specified, the report-UUID is used as the report directory, '
214+
'and the report directory specified with the --zip option with a zip '
215+
'extension is used for the zip file archive.'
216+
),
203217
},
204218
{
205219
'names': ['-p', '--purge', 'purge_file'],
206220
'metavar': 'PATH',
207221
'type': str,
208-
'help': ('Use a custom purge file to remove sensitive information from the report.')
222+
'help': ('Use a custom purge file to remove sensitive information from the report.'),
209223
},
210224
],
211225
},

0 commit comments

Comments
 (0)