Skip to content

Commit d32afef

Browse files
[pre-commit.ci] pre-commit autoupdate (#10221)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.9.3 → v0.9.4](astral-sh/ruff-pre-commit@v0.9.3...v0.9.4) - [github.com/psf/black: 24.10.0 → 25.1.0](psf/black@24.10.0...25.1.0) - [github.com/codespell-project/codespell: v2.4.0 → v2.4.1](codespell-project/codespell@v2.4.0...v2.4.1) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent bce5f0c commit d32afef

File tree

10 files changed

+23
-23
lines changed

10 files changed

+23
-23
lines changed

.pre-commit-config.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ repos:
2020
doc/data/messages/m/missing-final-newline/bad/crlf.py
2121
)$
2222
- repo: https://github.com/astral-sh/ruff-pre-commit
23-
rev: "v0.9.3"
23+
rev: "v0.9.4"
2424
hooks:
2525
- id: ruff
2626
args: ["--fix"]
@@ -41,7 +41,7 @@ repos:
4141
- id: isort
4242
exclude: doc/data/messages/
4343
- repo: https://github.com/psf/black
44-
rev: 24.10.0
44+
rev: 25.1.0
4545
hooks:
4646
- id: black
4747
args: [--safe, --quiet]
@@ -177,7 +177,7 @@ repos:
177177
args: ["-r", "-lll"]
178178
exclude: *fixtures
179179
- repo: https://github.com/codespell-project/codespell
180-
rev: v2.4.0
180+
rev: v2.4.1
181181
hooks:
182182
- id: codespell
183183
args: ["--toml=pyproject.toml"]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
STRING = "Valid escape character \x1B"
1+
STRING = "Valid escape character \x1b"

doc/test_messages_documentation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def _runTest(self) -> None:
167167
actual_messages_raw
168168
)
169169
if self.is_bad_test():
170-
bad_files = [(self._test_file[1])]
170+
bad_files = [self._test_file[1]]
171171
if self._test_file[1].is_dir() and not self.is_multifile_example():
172172
bad_files = list(self._test_file[1].iterdir())
173173
assert len(actual_messages_raw) >= len(bad_files), self.assert_message_bad(

pylint/checkers/spelling.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def _get_enchant_dicts() -> list[tuple[Any, enchant.ProviderDesc]]:
6464

6565

6666
def _get_enchant_dict_choices(
67-
inner_enchant_dicts: list[tuple[Any, enchant.ProviderDesc]]
67+
inner_enchant_dicts: list[tuple[Any, enchant.ProviderDesc]],
6868
) -> list[str]:
6969
return [""] + [d[0] for d in inner_enchant_dicts]
7070

pylint/checkers/unicode.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,19 @@
3535
# https://golangexample.com/go-linter-which-checks-for-dangerous-unicode-character-sequences/
3636
# We use '\u' because it doesn't require a map lookup and is therefore faster
3737
BIDI_UNICODE = [
38-
"\u202A", # \N{LEFT-TO-RIGHT EMBEDDING}
39-
"\u202B", # \N{RIGHT-TO-LEFT EMBEDDING}
40-
"\u202C", # \N{POP DIRECTIONAL FORMATTING}
41-
"\u202D", # \N{LEFT-TO-RIGHT OVERRIDE}
42-
"\u202E", # \N{RIGHT-TO-LEFT OVERRIDE}
38+
"\u202a", # \N{LEFT-TO-RIGHT EMBEDDING}
39+
"\u202b", # \N{RIGHT-TO-LEFT EMBEDDING}
40+
"\u202c", # \N{POP DIRECTIONAL FORMATTING}
41+
"\u202d", # \N{LEFT-TO-RIGHT OVERRIDE}
42+
"\u202e", # \N{RIGHT-TO-LEFT OVERRIDE}
4343
"\u2066", # \N{LEFT-TO-RIGHT ISOLATE}
4444
"\u2067", # \N{RIGHT-TO-LEFT ISOLATE}
4545
"\u2068", # \N{FIRST STRONG ISOLATE}
4646
"\u2069", # \N{POP DIRECTIONAL ISOLATE}
4747
# The following was part of PEP 672:
4848
# https://www.python.org/dev/peps/pep-0672/
4949
# so the list above might not be complete
50-
"\u200F", # \n{RIGHT-TO-LEFT MARK}
50+
"\u200f", # \n{RIGHT-TO-LEFT MARK}
5151
# We don't use
5252
# "\u200E" # \n{LEFT-TO-RIGHT MARK}
5353
# as this is the default for latin files and can't be used
@@ -100,7 +100,7 @@ def human_code(self) -> str:
100100
),
101101
_BadChar(
102102
"sub",
103-
"\x1A",
103+
"\x1a",
104104
"\\x1A",
105105
"E2512",
106106
(
@@ -110,7 +110,7 @@ def human_code(self) -> str:
110110
),
111111
_BadChar(
112112
"esc",
113-
"\x1B",
113+
"\x1b",
114114
"\\x1B",
115115
"E2513",
116116
(
@@ -129,7 +129,7 @@ def human_code(self) -> str:
129129
# Zero Width with Space. At the time of writing not accepted by Python.
130130
# But used in Trojan Source Examples, so still included and tested for.
131131
"zero-width-space",
132-
"\u200B", # \n{ZERO WIDTH SPACE}
132+
"\u200b", # \n{ZERO WIDTH SPACE}
133133
"\\u200B",
134134
"E2515",
135135
"Invisible space character could hide real code execution.",

pylint/checkers/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ def only_required_for_messages(
486486
"""
487487

488488
def store_messages(
489-
func: AstCallbackMethod[_CheckerT, _NodeT]
489+
func: AstCallbackMethod[_CheckerT, _NodeT],
490490
) -> AstCallbackMethod[_CheckerT, _NodeT]:
491491
func.checks_msgs = messages # type: ignore[attr-defined]
492492
return func

pylint/config/_pylint_config/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def __init__(self, valid_input: str, input_value: str, *args: object) -> None:
3333

3434

3535
def should_retry_after_invalid_input(
36-
func: Callable[_P, _ReturnValueT]
36+
func: Callable[_P, _ReturnValueT],
3737
) -> Callable[_P, _ReturnValueT]:
3838
"""Decorator that handles InvalidUserInput exceptions and retries."""
3939

tests/checkers/unittest_unicode/unittest_bad_chars.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ def encode_without_bom(string: str, encoding: str) -> bytes:
3737
"# Example File containing bad ASCII",
3838
"# invalid char backspace: \b",
3939
"# Bad carriage-return \r # not at the end",
40-
"# Invalid char sub: \x1A",
41-
"# Invalid char esc: \x1B",
40+
"# Invalid char sub: \x1a",
41+
"# Invalid char esc: \x1b",
4242
)
4343

4444
def _bad_char_file_generator(

tests/pyreverse/test_diadefs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def _process_classes(classes: list[DiagramEntity]) -> list[tuple[bool, str]]:
3636

3737

3838
def _process_relations(
39-
relations: dict[str, list[Relationship]]
39+
relations: dict[str, list[Relationship]],
4040
) -> list[tuple[str, str, str]]:
4141
"""Extract relation indices from a relation list."""
4242
result = []

tests/testutils/test_lint_module_output_update.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def inner(base: str) -> tuple[Path, Path, LintModuleOutputUpdate]:
3535

3636

3737
def test_lint_module_output_update_fail_before(
38-
lint_module_fixture: Callable[[str], tuple[Path, Path, LintModuleOutputUpdate]]
38+
lint_module_fixture: Callable[[str], tuple[Path, Path, LintModuleOutputUpdate]],
3939
) -> None:
4040
"""There is a fail before the output need to be updated."""
4141
filename, expected_output_file, lmou = lint_module_fixture("foo")
@@ -47,7 +47,7 @@ def test_lint_module_output_update_fail_before(
4747

4848

4949
def test_lint_module_output_update_effective(
50-
lint_module_fixture: Callable[[str], tuple[Path, Path, LintModuleOutputUpdate]]
50+
lint_module_fixture: Callable[[str], tuple[Path, Path, LintModuleOutputUpdate]],
5151
) -> None:
5252
"""The file is updated following a successful tests with wrong output."""
5353
filename, expected_output_file, lmou = lint_module_fixture("foo")
@@ -61,7 +61,7 @@ def test_lint_module_output_update_effective(
6161

6262

6363
def test_lint_module_output_update_remove_useless_txt(
64-
lint_module_fixture: Callable[[str], tuple[Path, Path, LintModuleOutputUpdate]]
64+
lint_module_fixture: Callable[[str], tuple[Path, Path, LintModuleOutputUpdate]],
6565
) -> None:
6666
"""The file is updated following a successful tests with wrong output."""
6767
filename, expected_output_file, lmou = lint_module_fixture("fine_name")

0 commit comments

Comments
 (0)