Skip to content

Commit

Permalink
fix f-string issue < 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
bckohan committed Jun 4, 2024
1 parent d16a4f8 commit 1ba8ebc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion django_routines/management/commands/routine.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,10 @@ def _list(self) -> None:
ruler = f"[underline]{' ' * width}[/underline]\n" if use_rich else "-" * width
cmd_strings = "\n".join(command_strings)
cmd_strings = f"{'[bright]' if use_rich else ''}{cmd_strings}{'[/bright]' if use_rich else ''}"
help_txt = f"\b\n{routine.help_text}\n{ruler}\b\n{'' if use_rich else '\b\n'}{cmd_strings}\n"
lb = "\b\n"
help_txt = (
f"{lb}{routine.help_text}\n{ruler}{lb}{'' if use_rich else lb}{cmd_strings}\n"
)
grp = Command.group(
help=help_txt, short_help=routine.help_text, invoke_without_command=True
)(locals()[name])
Expand Down

0 comments on commit 1ba8ebc

Please sign in to comment.