Skip to content

Commit 415865c

Browse files
committed
revert broken test changes
1 parent ab2b008 commit 415865c

File tree

5 files changed

+117
-130
lines changed

5 files changed

+117
-130
lines changed

.pre-commit-config.yaml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,16 @@
1212
#
1313
# See https://github.com/pre-commit/pre-commit
1414

15+
exclude: |
16+
(?x)(
17+
^tests/test_cydifflib_expect.html
18+
)
19+
20+
1521
repos:
1622
# Standard hooks
1723
- repo: https://github.com/pre-commit/pre-commit-hooks
18-
rev: "v4.4.0"
24+
rev: "v4.5.0"
1925
hooks:
2026
- id: check-added-large-files
2127
- id: check-case-conflict
@@ -32,26 +38,26 @@ repos:
3238

3339
# Black, the code formatter, natively supports pre-commit
3440
- repo: https://github.com/psf/black
35-
rev: "23.3.0" # Keep in sync with blacken-docs
41+
rev: "24.1.1" # Keep in sync with blacken-docs
3642
hooks:
3743
- id: black
3844

3945
# Also code format the docs
4046
- repo: https://github.com/asottile/blacken-docs
41-
rev: "1.13.0"
47+
rev: "1.16.0"
4248
hooks:
4349
- id: blacken-docs
4450
additional_dependencies:
4551
- black==22.8.0 # keep in sync with black hook
4652

4753
# Changes tabs to spaces
4854
- repo: https://github.com/Lucas-C/pre-commit-hooks
49-
rev: "v1.5.1"
55+
rev: "v1.5.4"
5056
hooks:
5157
- id: remove-tabs
5258

5359
- repo: https://github.com/sirosen/texthooks
54-
rev: "0.5.0"
60+
rev: "0.6.4"
5561
hooks:
5662
- id: fix-ligatures
5763
- id: fix-smartquotes
@@ -68,7 +74,7 @@ repos:
6874

6975
# PyLint has native support - not always usable, but works for us
7076
- repo: https://github.com/PyCQA/pylint
71-
rev: "v3.0.0a6"
77+
rev: "v3.0.3"
7278
hooks:
7379
- id: pylint
7480
files: ^pybind11
@@ -101,22 +107,22 @@ repos:
101107
additional_dependencies: [cmake, ninja]
102108

103109
- repo: https://github.com/charliermarsh/ruff-pre-commit
104-
rev: v0.0.261
110+
rev: v0.2.0
105111
hooks:
106112
- id: ruff
107113
args: ["--fix", "--show-fixes"]
108114

109115
# Check for spelling
110116
- repo: https://github.com/codespell-project/codespell
111-
rev: "v2.2.4"
117+
rev: "v2.2.6"
112118
hooks:
113119
- id: codespell
114120
exclude: ".*/test_.*.py"
115121
args: ["-L", "aline,alo,ore"]
116122

117123
# Check for common shell mistakes
118124
- repo: https://github.com/shellcheck-py/shellcheck-py
119-
rev: "v0.9.0.2"
125+
rev: "v0.9.0.6"
120126
hooks:
121127
- id: shellcheck
122128

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@ extend-ignore = [
7878
"PT004", # Use underscore for non-returning fixture (use usefixture instead)
7979
"PTH123", # use pathlib instead of builtin open
8080

81-
"F403" # todo we should do better in the future
81+
"F403", # todo we should do better in the future
82+
"RUF001", # this simply leads to incorrect code
83+
84+
"PT027" # we want to keep the test code close to the one in cpython
8285
]
8386
target-version = "py37"
8487
src = ["src"]

src/cydifflib/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
Class HtmlDiff:
2626
For producing HTML side by side comparison with change highlights.
2727
"""
28+
2829
from __future__ import annotations
2930

3031
__author__ = "Max Bachmann"

0 commit comments

Comments
 (0)