Skip to content

Commit

Permalink
update pre-commit and ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
entorb committed Feb 3, 2025
1 parent b776e0a commit 783a3b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
9 changes: 2 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,9 @@
# pre-commit install
# run manually
# pre-commit run --all-files
# or
# pre-commit run --files myFile1.py myFile2.py
# update hooks to latest version
# pre-commit autoupdate

# ruff replaces flake8, pyupgrade, and autoflake
# ruff-format replaces black, isort, add-trailing-comma

exclude: |
(?x)^(
scripts/ebook/v1.*|
Expand Down Expand Up @@ -62,7 +57,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.7.4"
rev: "v0.9.4"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand All @@ -84,7 +79,7 @@ repos:
- id: text-unicode-replacement-char

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.42.0
rev: v0.44.0
hooks:
- id: markdownlint
args: ["--disable", "MD013"]
Expand Down
6 changes: 3 additions & 3 deletions scripts/check_chapters_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ def test_it(fct: Callable, pairs: list[tuple[str, str]]) -> None:
# test of isolated function
assert fct(text) == expected_output, f"'{fct(text)}' != '{expected_output}'"
# test in complete fix_line context
assert (
fix_line(text) == expected_output
), f"'{fix_line(text)}' != '{expected_output}'"
assert fix_line(text) == expected_output, (
f"'{fix_line(text)}' != '{expected_output}'"
)


for lang in ["EN", "DE"]:
Expand Down

0 comments on commit 783a3b0

Please sign in to comment.