Skip to content

Commit

Permalink
Fix 3.10 UnionType ref
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobHayes committed Nov 16, 2021
1 parent d5a3ac7 commit 86ecad7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/arti/internal/type_hints.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def is_union(type_: Any) -> bool:

def is_union(type_: Any) -> bool:
# `Union[int, str]` or `int | str`
return type_ is Union or type_ is types.Union
return type_ is Union or type_ is types.UnionType # noqa: E721


def is_optional_hint(type_: Any) -> bool:
Expand Down

0 comments on commit 86ecad7

Please sign in to comment.