diff --git a/requirements-tests.txt b/requirements-tests.txt index 72b1fbe9e..6419d39d4 100644 --- a/requirements-tests.txt +++ b/requirements-tests.txt @@ -7,7 +7,7 @@ flake8-noqa==1.4.0 # must match .pre-commit-config.yaml flake8-pyi==24.6.0 # must match .pre-commit-config.yaml mypy==1.10.1 pre-commit-hooks==4.6.0 # must match .pre-commit-config.yaml -pyright==1.1.371 +pyright==1.1.372 pytype==2024.4.11; platform_system != "Windows" and python_version < "3.12" ruff==0.5.0 # must match .pre-commit-config.yaml diff --git a/stdlib/@tests/test_cases/builtins/check_pow.py b/stdlib/@tests/test_cases/builtins/check_pow.py index 1f38710d6..c8e2d277e 100644 --- a/stdlib/@tests/test_cases/builtins/check_pow.py +++ b/stdlib/@tests/test_cases/builtins/check_pow.py @@ -17,7 +17,11 @@ assert_type(pow(1, 0, None), Literal[1]) # assert_type(pow(2, 4, 0), NoReturn) assert_type(pow(2, 4), int) -assert_type(2**4, int) +# pyright infers a literal type here, but mypy does not. Unfortunately, +# there is no way to ignore an error only for mypy, so we can't check +# pyright's handling (https://github.com/python/mypy/issues/12358). +assert_type(2**4, int) # pyright: ignore +# pyright version: assert_type(2**4, Literal[16]) assert_type(pow(4, 6, None), int) assert_type(pow(5, -7), float)