Skip to content

Commit

Permalink
Fix callable for Python 3.6 (why do I still support it?)
Browse files Browse the repository at this point in the history
  • Loading branch information
erezsh committed Mar 9, 2024
1 parent 3d079dc commit 6c3a6db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtype/pytypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ def _to_canon(self, t):
elif origin is typing.Union:
res = [to_canon(x) for x in args]
return SumType(res)
elif origin is abc.Callable or t is typing.Callable:
elif origin is abc.Callable or origin is typing.Callable:
return Callable[ProductType(to_canon(x) for x in args[:-1]), to_canon(args[-1])]
return Callable # TODO
elif py38 and origin is typing.Literal:
Expand Down

0 comments on commit 6c3a6db

Please sign in to comment.