Comment out sections of typing.py that don't work

They will be fixed later.
This commit is contained in:
Padraic Fanning committed 2021-08-18 20:08:18 -04:00
1 parent 79779f87a5
commit 0892e54a63
1 file changed
+22 -20
+22 -20
View File
@@ -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):