From b02a6069727a2b15930ecde4ae35a1de412d6209 Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Wed, 11 Sep 2024 17:03:10 -0400 Subject: [PATCH] lint --- .pre-commit-config.yaml | 4 ++-- tests/test_type_resolution.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ae7102a..6bc6b5d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,12 +10,12 @@ repos: - id: validate-pyproject - repo: https://github.com/crate-ci/typos - rev: typos-dict-v0.11.27 + rev: v1.24.5 hooks: - id: typos - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.3 + rev: v0.6.4 hooks: - id: ruff args: [--fix, --unsafe-fixes] diff --git a/tests/test_type_resolution.py b/tests/test_type_resolution.py index 6c367f1..964312e 100644 --- a/tests/test_type_resolution.py +++ b/tests/test_type_resolution.py @@ -24,7 +24,7 @@ def test_resolve_type_hints(): assert hints["c"] == Optional[float] hints = resolve_type_hints(requires_unknown, localns={"Unknown": int}) - assert hints["param"] == int + assert hints["param"] is int def test_resolve_single_type_hints(): @@ -65,7 +65,7 @@ def test_type_resolved_signature(): type_resolved_signature(requires_unknown, raise_unresolved_optional_args=False) sig = type_resolved_signature(requires_unknown, localns={"Unknown": int}) - assert sig.parameters["param"].annotation == int + assert sig.parameters["param"].annotation is int def test_partial_resolution() -> None: @@ -162,4 +162,4 @@ def myfun(a: "unknown", b: "GlobalThing"): # type: ignore # noqa raise_unresolved_required_args=False, ) assert _a.parameters["a"].annotation == "unknown" - assert _a.parameters["b"].annotation == int + assert _a.parameters["b"].annotation is int