Skip to content

Commit a5ee079

Browse files
LilSpazJoekpgithub-actions[bot]
authored andcommitted
Update pre-commit hooks
1 parent fcfdbd8 commit a5ee079

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎.pre-commit-config.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ repos:
2727
id: ruff
2828
- id: ruff-format
2929
repo: https://github.com/astral-sh/ruff-pre-commit
30-
rev: c59bba8fb259db0fec2bbb77ad8ba51ea7341b56 # frozen: v0.15.20
30+
rev: 2700fd5671c633760d912769c041bfcde2b9a01b # frozen: v0.15.22
3131

3232
- hooks:
3333
- files: ^(.*\.toml)$

‎codesorter/cli.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def _check_files(*, files: list[str]) -> int:
9393
continue
9494
try:
9595
new_tree = SortCodeCommand(CodemodContext()).transform_module(cst.parse_module(source))
96-
except Exception as exc: # noqa: BLE001
96+
except Exception as exc: # ruff:ignore[blind-except]
9797
sys.stderr.write(f"{path}: transform error: {exc}\n")
9898
failed.append(path)
9999
continue

‎codesorter/sort_code.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ def _fold_runtime_dependencies(self) -> None:
365365
for callee in callees:
366366
self.dependencies[name].update(runtime.get(callee, ()))
367367

368-
def _get_dependencies( # noqa: C901
368+
def _get_dependencies( # ruff:ignore[complex-structure]
369369
self,
370370
node: _Sortable,
371371
) -> tuple[list[str], md.Scope]:
@@ -490,7 +490,7 @@ def _is_order_sensitive_class(self, node: cst.ClassDef) -> bool:
490490
return True
491491
return False
492492

493-
def _node_sort_key( # noqa: C901
493+
def _node_sort_key( # ruff:ignore[complex-structure]
494494
self,
495495
node: _Sortable,
496496
) -> tuple[int, int, MethodType, FixtureType, bool, str, PropertyType]:

‎tests/test_sort_code.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,8 @@ def test_fixture_files_execute(self):
225225
try:
226226
code = compile(path.read_text(encoding="utf-8"), str(path), "exec")
227227
with redirect_stdout(captured), redirect_stderr(captured):
228-
exec(code, {"__name__": "__fixture__"}) # noqa: S102
229-
except Exception as error: # noqa: BLE001
228+
exec(code, {"__name__": "__fixture__"}) # ruff:ignore[exec-builtin]
229+
except Exception as error: # ruff:ignore[blind-except]
230230
failures.append(f"{path.name}: {type(error).__name__}: {error}")
231231
continue
232232
if captured.getvalue():

0 commit comments

Comments
 (0)