Skip to content

Commit

Permalink
Fix error for Python 3.8 and 3.9 for type checking Box
Browse files Browse the repository at this point in the history
  • Loading branch information
Diviloper committed Dec 20, 2023
1 parent b8baf8c commit 0f9b5d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pymeos/pymeos/collections/time/tstzset.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ def is_contained_in(

if isinstance(container, Temporal):
return self.is_contained_in(container.time())
elif isinstance(container, Box):
elif isinstance(container, get_args(Box)):
return self.is_contained_in(container.to_tstzspan())
else:
return super().is_contained_in(container)
Expand Down Expand Up @@ -409,7 +409,7 @@ def overlaps(
)
elif isinstance(other, Temporal):
return self.to_spanset().overlaps(other)
elif isinstance(other, Box):
elif isinstance(other, get_args(Box)):
return self.to_span().overlaps(other)
else:
return super().overlaps(other)
Expand Down
2 changes: 1 addition & 1 deletion pymeos/pymeos/collections/time/tstzspan.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def is_contained_in(

if isinstance(container, Temporal):
return self.is_contained_in(container.tstzspan())
elif isinstance(container, Box):
elif isinstance(container, get_args(Box)):
return self.is_contained_in(container.to_tstzspan())
else:
return super().is_contained_in(container)
Expand Down

0 comments on commit 0f9b5d9

Please sign in to comment.