mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-30 08:04:24 +08:00
Remove NoReturn overloads from pow() (#8568)
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
from decimal import Decimal
|
||||
from fractions import Fraction
|
||||
from typing import Any, NoReturn
|
||||
from typing import Any
|
||||
from typing_extensions import Literal, assert_type
|
||||
|
||||
# See #7163
|
||||
@@ -10,7 +10,11 @@ assert_type(pow(1, 0), Literal[1])
|
||||
assert_type(1**0, Literal[1])
|
||||
assert_type(pow(1, 0, None), Literal[1])
|
||||
|
||||
assert_type(pow(2, 4, 0), NoReturn)
|
||||
# TODO: We don't have a good way of expressing the fact
|
||||
# that passing 0 for the third argument will lead to an exception being raised
|
||||
# (see discussion in #8566)
|
||||
#
|
||||
# assert_type(pow(2, 4, 0), NoReturn)
|
||||
|
||||
assert_type(pow(2, 4), int)
|
||||
assert_type(2**4, int)
|
||||
|
||||
Reference in New Issue
Block a user