Skip to content

Commit

Permalink
bwic
Browse files Browse the repository at this point in the history
  • Loading branch information
mkorpela committed Aug 6, 2023
1 parent d9bcc4a commit 866d3cc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion overrides/typing_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@
else:
_TypedDictMeta = None

if hasattr(types, "UnionType"):
UnionType = getattr(types, "UnionType")
else:
UnionType = None


unknown = None

Expand Down Expand Up @@ -63,7 +68,7 @@


def is_union(element: object) -> bool:
return element is typing.Union or element is types.UnionType
return element is typing.Union or element is UnionType

def optional_all(elements) -> typing.Optional[bool]:
if all(elements):
Expand Down

0 comments on commit 866d3cc

Please sign in to comment.