Skip to content

Commit 89ab330

Browse files
authored
Merge pull request #44 from erezsh/dev
Fix following PR #36 (reported by @KokeCacao)
2 parents 6b92678 + 885e041 commit 89ab330

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

runtype/base_types.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,12 @@ def __le__(self, other):
157157

158158
return NotImplemented
159159

160+
def __ge__(self, other):
161+
if isinstance(other, DataType):
162+
return False
163+
164+
return NotImplemented
165+
160166

161167
class ContainerType(DataType):
162168
"""Base class for containers, such as generics.

tests/test_basic.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ def test_basic(self):
7070

7171
assert isa((3,), (Tuple[int], list))
7272
assert not isa([40, 2], Tuple[int, int])
73+
assert not issubclass(float, typing.Tuple[float, float])
7374

7475
# Mappings
7576
assert issubclass(dict, abc.Mapping)

0 commit comments

Comments
 (0)