Skip to content
Open
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.15.20"
rev: "v0.15.21"
hooks:
- id: ruff-check
args: ["--fix"]
Expand Down Expand Up @@ -34,7 +34,7 @@ repos:
hooks:
- id: python-use-type-annotations
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v2.1.0
rev: v2.3.0
hooks:
- id: mypy
files: ^(src/|testing/|scripts/)
Expand Down
3 changes: 2 additions & 1 deletion testing/freeze/tox_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@

if __name__ == "__main__":
import os
import subprocess
import sys

executable = os.path.join(os.getcwd(), "dist", "runtests_script", "runtests_script")
if sys.platform.startswith("win"):
executable += ".exe"
sys.exit(os.system(f"{executable} tests"))
sys.exit(subprocess.call([executable, "tests"]))
2 changes: 1 addition & 1 deletion testing/test_monkeypatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ def test_context() -> None:
with monkeypatch.context() as m:
m.setattr(functools, "partial", 3)
assert not inspect.isclass(functools.partial)
assert inspect.isclass(functools.partial)
assert inspect.isclass(functools.partial) # type: ignore[unreachable]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a mypy false positive, we can actually reach this code. The test pass, but if you invert the condition it fails with:

AssertionError: assert not True where True = isclass(<class 'functools.partial'>)



def test_context_classmethod() -> None:
Expand Down
Loading