diff --git a/runtype/base_types.py b/runtype/base_types.py index 7cc3d10..902d88f 100644 --- a/runtype/base_types.py +++ b/runtype/base_types.py @@ -157,6 +157,12 @@ def __le__(self, other): return NotImplemented + def __ge__(self, other): + if isinstance(other, DataType): + return False + + return NotImplemented + class ContainerType(DataType): """Base class for containers, such as generics. diff --git a/tests/test_basic.py b/tests/test_basic.py index 06222c2..b93f1ff 100644 --- a/tests/test_basic.py +++ b/tests/test_basic.py @@ -70,6 +70,7 @@ def test_basic(self): assert isa((3,), (Tuple[int], list)) assert not isa([40, 2], Tuple[int, int]) + assert not issubclass(float, typing.Tuple[float, float]) # Mappings assert issubclass(dict, abc.Mapping)