Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 committed Sep 11, 2024
1 parent 86f820d commit b02a606
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
6 changes: 3 additions & 3 deletions tests/test_type_resolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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

0 comments on commit b02a606

Please sign in to comment.