Skip to content

Commit 8af69a0

Browse files
authored
Bump ruff-pre-commit to v0.3.2 (#412)
1 parent 08bcb3c commit 8af69a0

File tree

5 files changed

+30
-27
lines changed

5 files changed

+30
-27
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ repos:
2222
- id: check-docstring-first
2323

2424
- repo: https://github.com/astral-sh/ruff-pre-commit
25-
rev: v0.2.0
25+
rev: v0.3.2
2626
hooks:
2727
- id: ruff
2828
- id: ruff-format

pyproject.toml

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -58,27 +58,30 @@ extend-exclude = [
5858
]
5959

6060
[tool.ruff.lint]
61+
ignore = [
62+
"ISC001", # prevent conflicts with the formatter
63+
]
6164
unfixable = [
62-
"ERA", # do not autoremove commented out code
65+
"ERA", # do not autoremove commented out code
6366
]
6467
extend-select = [
65-
"B", # flake8-bugbear
66-
"C4", # flake8-comprehensions
67-
"ERA", # flake8-eradicate/eradicate
68-
"I", # isort
69-
"N", # pep8-naming
70-
"PIE", # flake8-pie
71-
"PGH", # pygrep
72-
"PTH", # flake8-use-pathlib
73-
"ISC", # flake8-implicit-string-concat
74-
"RET", # flake8-return
75-
"FLY", # flynt
76-
"PERF", # perflint
77-
"RUF", # ruff checks
78-
"SIM", # flake8-simplify
79-
"TCH", # flake8-type-checking
80-
"TID", # flake8-tidy-imports
81-
"UP", # pyupgrade
68+
"B", # flake8-bugbear
69+
"C4", # flake8-comprehensions
70+
"ERA", # flake8-eradicate/eradicate
71+
"I", # isort
72+
"N", # pep8-naming
73+
"PIE", # flake8-pie
74+
"PGH", # pygrep
75+
"PTH", # flake8-use-pathlib
76+
"ISC", # flake8-implicit-string-concat
77+
"RET", # flake8-return
78+
"FLY", # flynt
79+
"PERF", # perflint
80+
"RUF", # ruff checks
81+
"SIM", # flake8-simplify
82+
"TCH", # flake8-type-checking
83+
"TID", # flake8-tidy-imports
84+
"UP", # pyupgrade
8285
]
8386

8487
[tool.ruff.lint.flake8-tidy-imports]

src/cleo/ui/progress_indicator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def _overwrite(self, message: str) -> None:
177177
Overwrites a previous message to the output.
178178
"""
179179
if self._io.is_decorated():
180-
self._io.write("\x0D\x1B[2K")
180+
self._io.write("\x0d\x1b[2K")
181181
self._io.write(message)
182182
else:
183183
self._io.write_line(message)

tests/ui/test_progress_bar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def generate_output(expected: list[str]) -> str:
3131
count = line.count("\n")
3232

3333
if count:
34-
output += f"\x1B[{count}A\x1B[1G\x1b[2K"
34+
output += f"\x1b[{count}A\x1b[1G\x1b[2K"
3535
else:
3636
output += "\x1b[1G\x1b[2K"
3737

tests/ui/test_progress_indicator.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,19 @@ def test_default_indicator(ansi_io: BufferedIO, sleep: Callable[[float], None])
4949
" | Done...",
5050
]
5151

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

5454
expected += "\n"
5555

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

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

6060
expected += "\n"
6161

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

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

6666
expected += "\n"
6767

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

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

111111
expected += "\n"
112112

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

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

117117
expected += "\n"
118118

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

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

123123
expected += "\n"
124124

0 commit comments

Comments
 (0)