diff --git a/requirements-tests.txt b/requirements-tests.txt index c452aa0a1871..217dd276b46e 100644 --- a/requirements-tests.txt +++ b/requirements-tests.txt @@ -2,7 +2,7 @@ # be pinned to a specific version to make failure reproducible. mypy==2.3.0 pyrefly==1.3.0.dev1 -pyright==1.1.411 +pyright==1.1.413 ty==0.0.59 # Libraries used by our various scripts. diff --git a/stdlib/@tests/test_cases/check_types.py b/stdlib/@tests/test_cases/check_types.py index d17a8b176fc8..83040989f31f 100644 --- a/stdlib/@tests/test_cases/check_types.py +++ b/stdlib/@tests/test_cases/check_types.py @@ -78,8 +78,10 @@ def foo(self) -> None: if sys.version_info >= (3, 11): union_type = int | list[_T] + # pyright and mypy infer different types here # ideally this would be `_SpecialForm` (Union) - assert_type(union_type | Literal[1], types.UnionType | Any) + assert_type(union_type | Literal[1], types.UnionType | Any) # pyright: ignore[reportAssertTypeFailure] + # assert_type(union_type | Literal[1], types.UnionType | type[Literal[1]]) # this is what pyright infers # Both mypy and pyright special-case this operation, # but in different ways, so we just check that no error is emitted: _ = union_type[int]