Skip to content

Commit

Permalink
revert broken test changes
Browse files Browse the repository at this point in the history
  • Loading branch information
maxbachmann committed Feb 3, 2024
1 parent ab2b008 commit 415865c
Show file tree
Hide file tree
Showing 5 changed files with 117 additions and 130 deletions.
24 changes: 15 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,16 @@
#
# See https://github.com/pre-commit/pre-commit

exclude: |
(?x)(
^tests/test_cydifflib_expect.html
)
repos:
# Standard hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.4.0"
rev: "v4.5.0"
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand All @@ -32,26 +38,26 @@ repos:

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

# Also code format the docs
- repo: https://github.com/asottile/blacken-docs
rev: "1.13.0"
rev: "1.16.0"
hooks:
- id: blacken-docs
additional_dependencies:
- black==22.8.0 # keep in sync with black hook

# Changes tabs to spaces
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: "v1.5.1"
rev: "v1.5.4"
hooks:
- id: remove-tabs

- repo: https://github.com/sirosen/texthooks
rev: "0.5.0"
rev: "0.6.4"
hooks:
- id: fix-ligatures
- id: fix-smartquotes
Expand All @@ -68,7 +74,7 @@ repos:

# PyLint has native support - not always usable, but works for us
- repo: https://github.com/PyCQA/pylint
rev: "v3.0.0a6"
rev: "v3.0.3"
hooks:
- id: pylint
files: ^pybind11
Expand Down Expand Up @@ -101,22 +107,22 @@ repos:
additional_dependencies: [cmake, ninja]

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.261
rev: v0.2.0
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]

# Check for spelling
- repo: https://github.com/codespell-project/codespell
rev: "v2.2.4"
rev: "v2.2.6"
hooks:
- id: codespell
exclude: ".*/test_.*.py"
args: ["-L", "aline,alo,ore"]

# Check for common shell mistakes
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: "v0.9.0.2"
rev: "v0.9.0.6"
hooks:
- id: shellcheck

Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ extend-ignore = [
"PT004", # Use underscore for non-returning fixture (use usefixture instead)
"PTH123", # use pathlib instead of builtin open

"F403" # todo we should do better in the future
"F403", # todo we should do better in the future
"RUF001", # this simply leads to incorrect code

"PT027" # we want to keep the test code close to the one in cpython
]
target-version = "py37"
src = ["src"]
Expand Down
1 change: 1 addition & 0 deletions src/cydifflib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
Class HtmlDiff:
For producing HTML side by side comparison with change highlights.
"""

from __future__ import annotations

__author__ = "Max Bachmann"
Expand Down
Loading

0 comments on commit 415865c

Please sign in to comment.