Skip to content

Commit

Permalink
Merge pull request #44 from erezsh/dev
Browse files Browse the repository at this point in the history
Fix following PR #36 (reported by @KokeCacao)
  • Loading branch information
erezsh authored Oct 6, 2023
2 parents 6b92678 + 885e041 commit 89ab330
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 89ab330

Please sign in to comment.