mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Comment out sections of typing.py that don't work
They will be fixed later.
This commit is contained in:
1 file changed
+22
-20
Vendored
+22
-20
@@ -73,13 +73,13 @@ __all__ = [
|
||||
|
||||
# Structural checks, a.k.a. protocols.
|
||||
'Reversible',
|
||||
'SupportsAbs',
|
||||
# 'SupportsAbs', # TODO: RUSTPYTHON
|
||||
'SupportsBytes',
|
||||
'SupportsComplex',
|
||||
'SupportsFloat',
|
||||
'SupportsIndex',
|
||||
'SupportsInt',
|
||||
'SupportsRound',
|
||||
# 'SupportsRound', # TODO: RUSTPYTHON
|
||||
|
||||
# Concrete collection types.
|
||||
'ChainMap',
|
||||
@@ -1570,24 +1570,26 @@ class SupportsIndex(Protocol):
|
||||
pass
|
||||
|
||||
|
||||
@runtime_checkable
|
||||
class SupportsAbs(Protocol[T_co]):
|
||||
"""An ABC with one abstract method __abs__ that is covariant in its return type."""
|
||||
__slots__ = ()
|
||||
|
||||
@abstractmethod
|
||||
def __abs__(self) -> T_co:
|
||||
pass
|
||||
|
||||
|
||||
@runtime_checkable
|
||||
class SupportsRound(Protocol[T_co]):
|
||||
"""An ABC with one abstract method __round__ that is covariant in its return type."""
|
||||
__slots__ = ()
|
||||
|
||||
@abstractmethod
|
||||
def __round__(self, ndigits: int = 0) -> T_co:
|
||||
pass
|
||||
# TODO: RUSTPYTHON, sort out the method resolution order nonsense
|
||||
#
|
||||
# @runtime_checkable
|
||||
# class SupportsAbs(Protocol[T_co]):
|
||||
# """An ABC with one abstract method __abs__ that is covariant in its return type."""
|
||||
# __slots__ = ()
|
||||
#
|
||||
# @abstractmethod
|
||||
# def __abs__(self) -> T_co:
|
||||
# pass
|
||||
#
|
||||
#
|
||||
# @runtime_checkable
|
||||
# class SupportsRound(Protocol[T_co]):
|
||||
# """An ABC with one abstract method __round__ that is covariant in its return type."""
|
||||
# __slots__ = ()
|
||||
#
|
||||
# @abstractmethod
|
||||
# def __round__(self, ndigits: int = 0) -> T_co:
|
||||
# pass
|
||||
|
||||
|
||||
def _make_nmtuple(name, types):
|
||||
|
||||
Reference in new issue
Block a user