Skip to content

Commit

Permalink
Update .pre-commit-config.yaml and minor adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
entorb committed Aug 19, 2024
1 parent 3be3dc7 commit a886290
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ repos:
- id: trailing-whitespace

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

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.39.0
rev: v0.41.0
hooks:
- id: markdownlint
args: ["--disable", "MD013"]
Expand Down
2 changes: 1 addition & 1 deletion scripts/check_chapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def get_list_of_chapter_files() -> list[Path]:
"""
list_of_files: list[Path] = []
with Path("hpmor.tex").open(encoding="utf-8") as fh:
for line in fh.readlines():
for line in fh:
my_match = re.search(r"^.*include\{(chapters/.+?)\}.*$", line)
if my_match:
include_path = my_match.group(1)
Expand Down
4 changes: 1 addition & 3 deletions scripts/check_chapters_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,7 @@ def test_fix_spell(lang: str) -> None:
def checkit(fct: Callable, pairs: list[tuple[str, str]]) -> None:
for text, expected_output in pairs:
# test of isolated function
assert (
fct(text) == expected_output #
), f"'{fct(text)}' != '{expected_output}'"
assert fct(text) == expected_output, f"'{fct(text)}' != '{expected_output}'"

# test in complete fix_line context
assert (
Expand Down

0 comments on commit a886290

Please sign in to comment.