mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Fix several new-in-3.11 stubtest errors (#7973)
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import sys
|
||||
from _typeshed import Self
|
||||
from collections.abc import Callable
|
||||
from decimal import Decimal
|
||||
from numbers import Integral, Rational, Real
|
||||
from typing import Any, overload
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing_extensions import Literal, SupportsIndex, TypeAlias
|
||||
|
||||
_ComparableNum: TypeAlias = int | float | Decimal | Real
|
||||
|
||||
@@ -141,7 +142,7 @@ class Fraction(Rational):
|
||||
def __copy__(self: Self) -> Self: ...
|
||||
def __deepcopy__(self: Self, memo: Any) -> Self: ...
|
||||
if sys.version_info >= (3, 11):
|
||||
def __int__(self) -> int: ...
|
||||
def __int__(self, _index: Callable[[SupportsIndex], int] = ...) -> int: ...
|
||||
# Not actually defined within fractions.py, but provides more useful
|
||||
# overrides
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user