Update pyright to v1.1.395; disable a pow() check (#13564)

pyright and mypy disagree about the exact type due to differing
overloads handling.

---------

Co-authored-by: Avasam <samuel.06@hotmail.com>
This commit is contained in:
Sebastian Rittau
2025-03-03 17:49:41 +01:00
committed by GitHub
parent 9f11db4296
commit 3e83e42a0f
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
# Type checkers that we test our stubs against. These should always
# be pinned to a specific version to make failure reproducible.
mypy==1.15.0
pyright==1.1.389
pyright==1.1.395
# pytype can be installed on Windows, but requires building wheels, let's not do that on the CI
pytype==2024.10.11; platform_system != "Windows" and python_version >= "3.10" and python_version < "3.13"
@@ -47,7 +47,9 @@ assert_type(pow(complex(6), 6.2), complex)
assert_type(complex(6) ** 6.2, complex)
assert_type(pow(complex(9), 7.3, None), complex)
assert_type(pow(Fraction(), 4, None), Fraction)
# pyright infers Fraction | float | complex, while mypy infers Fraction.
# This is probably because of differences in @overload handling.
assert_type(pow(Fraction(), 4, None), Fraction) # pyright: ignore[reportAssertTypeFailure]
assert_type(Fraction() ** 4, Fraction)
assert_type(pow(Fraction(3, 7), complex(1, 8)), complex)