Skip to content

Commit 2f9bcc3

Browse files
committed
Fixed formatting from new Ruff version
1 parent 64a98c4 commit 2f9bcc3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

sphinxarg/ext.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def print_action_groups(
158158
arg = []
159159
if 'choices' in entry:
160160
arg.append(
161-
f"Possible choices: {', '.join(str(c) for c in entry['choices'])}\n"
161+
f'Possible choices: {", ".join(str(c) for c in entry["choices"])}\n'
162162
)
163163
if 'help' in entry:
164164
arg.append(entry['help'])

sphinxarg/parser.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def parser_navigate(parser_result, path, current_path=None):
1818
if len(path) == 0:
1919
return parser_result
2020
if 'children' not in parser_result:
21-
msg = f"Current parser has no child elements. (path: {' '.join(current_path)})"
21+
msg = f'Current parser has no child elements. (path: {" ".join(current_path)})'
2222
raise NavigationException(msg)
2323
next_hop = path.pop(0)
2424
for child in parser_result['children']:
@@ -28,8 +28,8 @@ def parser_navigate(parser_result, path, current_path=None):
2828
current_path.append(next_hop)
2929
return parser_navigate(child, path, current_path)
3030
msg = (
31-
f"Current parser has no child element with name: {next_hop} "
32-
f"(path: {' '.join(current_path)})"
31+
f'Current parser has no child element with name: {next_hop} '
32+
f'(path: {" ".join(current_path)})'
3333
)
3434
raise NavigationException(msg)
3535

@@ -88,7 +88,7 @@ def parse_parser(parser, data=None, **kwargs):
8888
subalias = subsection_alias[subaction]
8989
subaction.prog = f'{parser.prog} {name}'
9090
subdata = {
91-
'name': name if not subalias else f"{name} ({', '.join(subalias)})",
91+
'name': name if not subalias else f'{name} ({", ".join(subalias)})',
9292
'help': helps.get(name, ''),
9393
'usage': subaction.format_usage().strip(),
9494
'bare_usage': _format_usage_without_prefix(subaction),

0 commit comments

Comments
 (0)