Source code for rate_control._helpers._protocols

__all__ = [
    'Comparable',
]

import sys
from abc import abstractmethod
from typing import Protocol

if sys.version_info >= (3, 11):
    from typing import Self
else:
    from typing_extensions import Self


[docs]class Comparable(Protocol): __slots__ = ()
[docs] @abstractmethod def __lt__(self, other: Self, /) -> bool: """Comparison operator. Args: other: Another object of the same type. Returns: Whether ``self < other``. """