mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-26 19:47:14 +08:00
stdlib: Add several missing __(deep)copy__ methods (#7242)
This commit is contained in:
@@ -2,7 +2,7 @@ import sys
|
||||
from _typeshed import Self
|
||||
from decimal import Decimal
|
||||
from numbers import Integral, Rational, Real
|
||||
from typing import Union, overload
|
||||
from typing import Any, Union, overload
|
||||
from typing_extensions import Literal
|
||||
|
||||
_ComparableNum = Union[int, float, Decimal, Real]
|
||||
@@ -135,6 +135,8 @@ class Fraction(Rational):
|
||||
def __le__(self, other: _ComparableNum) -> bool: ...
|
||||
def __ge__(self, other: _ComparableNum) -> bool: ...
|
||||
def __bool__(self) -> bool: ...
|
||||
def __copy__(self: Self) -> Self: ...
|
||||
def __deepcopy__(self: Self, memo: Any) -> Self: ...
|
||||
if sys.version_info >= (3, 11):
|
||||
def __int__(self) -> int: ...
|
||||
# Not actually defined within fractions.py, but provides more useful
|
||||
|
||||
Reference in New Issue
Block a user