mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user