Skip to content

Commit 88e80e0

Browse files
authored
bump pyrefly to 0.35.0 (#453)
2 parents e9bf205 + 8a710d8 commit 88e80e0

File tree

3 files changed

+83
-56
lines changed

3 files changed

+83
-56
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ type = [
8282
{ include-group = "test" },
8383
"basedpyright>=1.31.5",
8484
"mypy[faster-cache]>=1.18.2",
85-
"pyrefly==0.34.0",
85+
"pyrefly==0.35.0",
8686
]
8787
dev = [
8888
{ include-group = "extra" },

tests/test_inspect.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,11 +268,14 @@ def test_staticmethod_is_final() -> None:
268268
@pytest.mark.parametrize("origin", [type, list, tuple, GenericTP, GenericTPX])
269269
def test_is_generic_alias(origin: op.types.GenericType) -> None:
270270
assert not op.inspect.is_generic_alias(origin)
271-
272271
assert op.inspect.is_generic_alias(origin[None])
272+
273273
Alias = TypeAliasType("Alias", origin[None]) # type: ignore[valid-type] # noqa: N806
274274
assert op.inspect.is_generic_alias(Alias)
275+
276+
# pyrefly: ignore[not-a-type]
275277
assert op.inspect.is_generic_alias(tp.Annotated[origin[None], None])
278+
# pyrefly: ignore[not-a-type]
276279
assert op.inspect.is_generic_alias(tpx.Annotated[origin[None], None])
277280

278281
assert not op.inspect.is_generic_alias(origin[None] | None)
@@ -302,9 +305,13 @@ def test_is_runtime_protocol() -> None:
302305
@pytest.mark.parametrize("origin", [int, tp.Literal[True], Proto, ProtoX])
303306
def test_is_union_type(origin: type) -> None:
304307
assert op.inspect.is_union_type(origin | None)
308+
305309
Alias: TypeAliasType = TypeAliasType("Alias", origin | None) # noqa: N806 # pyright: ignore[reportGeneralTypeIssues]
306310
assert op.inspect.is_union_type(Alias)
311+
312+
# pyrefly: ignore[not-a-type]
307313
assert op.inspect.is_union_type(tp.Annotated[origin | None, None])
314+
# pyrefly: ignore[not-a-type]
308315
assert op.inspect.is_union_type(tp.Annotated[origin, None] | None)
309316

310317
assert not op.inspect.is_union_type(origin)

0 commit comments

Comments
 (0)