Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
minimum_pre_commit_version: "4.4.0"
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.16.10"
rev: "v0.17.0"
hooks:
- id: ruff-check
args: ["--fix"]
Expand Down Expand Up @@ -74,7 +74,7 @@ repos:
# https://pyproject-fmt.readthedocs.io/en/latest/#calculating-max-supported-python-version
additional_dependencies: ["tox>=4.9"]
- repo: https://github.com/asottile/pyupgrade
rev: v3.21.2
rev: v3.22.0
hooks:
- id: pyupgrade
args:
Expand Down
4 changes: 1 addition & 3 deletions src/_pytest/assertion/rewrite.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@


try:
from _imp import ( # type: ignore[attr-defined]
_fix_co_filename as _imp_fix_co_filename,
)
from _imp import _fix_co_filename as _imp_fix_co_filename # type: ignore[attr-defined]
except ImportError: # pragma: no cover
_imp_fix_co_filename = None

Expand Down
4 changes: 1 addition & 3 deletions testing/test_assertrewrite.py
Original file line number Diff line number Diff line change
Expand Up @@ -1173,9 +1173,7 @@ def test_moved_test_file_updates_code_filename(
The rewritten pyc is reused: filenames are corrected in memory, not by
rewriting the cache.
"""
from _pytest.assertion.rewrite import ( # type: ignore[attr-defined]
_imp_fix_co_filename,
)
from _pytest.assertion.rewrite import _imp_fix_co_filename # type: ignore[attr-defined]

monkeypatch.delenv("PYTHONDONTWRITEBYTECODE", raising=False)
monkeypatch.delenv("PYTHONPYCACHEPREFIX", raising=False)
Expand Down
Loading