Skip to content

Commit

Permalink
Reformat files due to ruff-pre-commit upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
bswck committed Mar 15, 2024
1 parent 13cabbf commit 78ea9b6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/cleo/ui/progress_indicator.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def _overwrite(self, message: str) -> None:
Overwrites a previous message to the output.
"""
if self._io.is_decorated():
self._io.write("\x0D\x1B[2K")
self._io.write("\x0d\x1b[2K")
self._io.write(message)
else:
self._io.write_line(message)
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/test_progress_bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def generate_output(expected: list[str]) -> str:
count = line.count("\n")

if count:
output += f"\x1B[{count}A\x1B[1G\x1b[2K"
output += f"\x1b[{count}A\x1b[1G\x1b[2K"
else:
output += "\x1b[1G\x1b[2K"

Expand Down
12 changes: 6 additions & 6 deletions tests/ui/test_progress_indicator.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,19 @@ def test_default_indicator(ansi_io: BufferedIO, sleep: Callable[[float], None])
" | Done...",
]

expected = "\x0D\x1B[2K" + "\x0D\x1B[2K".join(output)
expected = "\x0d\x1b[2K" + "\x0d\x1b[2K".join(output)

expected += "\n"

output = [" - Starting Again...", " \\ Starting Again...", " \\ Done Again..."]

expected += "\x0D\x1B[2K" + "\x0D\x1B[2K".join(output)
expected += "\x0d\x1b[2K" + "\x0d\x1b[2K".join(output)

expected += "\n"

output = [" - Starting Again...", " \\ Starting Again...", " - Done Again..."]

expected += "\x0D\x1B[2K" + "\x0D\x1B[2K".join(output)
expected += "\x0d\x1b[2K" + "\x0d\x1b[2K".join(output)

expected += "\n"

Expand Down Expand Up @@ -106,19 +106,19 @@ def test_explicit_format(ansi_io: BufferedIO, sleep: Callable[[float], None]) ->
" | Done...",
]

expected = "\x0D\x1B[2K" + "\x0D\x1B[2K".join(output)
expected = "\x0d\x1b[2K" + "\x0d\x1b[2K".join(output)

expected += "\n"

output = [" - Starting Again...", " \\ Starting Again...", " \\ Done Again..."]

expected += "\x0D\x1B[2K" + "\x0D\x1B[2K".join(output)
expected += "\x0d\x1b[2K" + "\x0d\x1b[2K".join(output)

expected += "\n"

output = [" - Starting Again...", " \\ Starting Again...", " - Done Again..."]

expected += "\x0D\x1B[2K" + "\x0D\x1B[2K".join(output)
expected += "\x0d\x1b[2K" + "\x0d\x1b[2K".join(output)

expected += "\n"

Expand Down

0 comments on commit 78ea9b6

Please sign in to comment.