How to use the typish.get_mro function in typish

To help you get started, we’ve selected a few typish examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ramonhagenaars / nptyping / nptyping / types / _datetime64.py View on Github external
def __subclasscheck__(cls, subclass: type) -> bool:
        return Datetime64 in get_mro(subclass)
github ramonhagenaars / nptyping / nptyping / types / _number.py View on Github external
def _is_a(this: Any, that: type) -> bool:
    # Return whether this is a subclass of that, considering the mro.
    return that in get_mro(this)
github ramonhagenaars / nptyping / nptyping / types / _bool.py View on Github external
def __subclasscheck__(cls, subclass: type) -> bool:
        return Bool in get_mro(subclass)
github ramonhagenaars / nptyping / nptyping / types / _timedelta64.py View on Github external
def __subclasscheck__(cls, subclass: type) -> bool:
        return Timedelta64 in get_mro(subclass)
github ramonhagenaars / nptyping / nptyping / types / _unicode.py View on Github external
def __subclasscheck__(cls, subclass: type) -> bool:
        if Unicode in get_mro(subclass):
            return cls.chars is Any or subclass.chars <= cls.chars
        return False