Skip to content

Commit

Permalink
Fix following PR #36 (reported by @KokeCacao)
Browse files Browse the repository at this point in the history
  • Loading branch information
erezsh committed Oct 6, 2023
1 parent 6b92678 commit 885e041
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions runtype/base_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 885e041

Please sign in to comment.