Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'master' into protocols
  • Loading branch information
ilevkivskyi authored Jul 28, 2017
commit eecef84c3eb14d85cb8dc7c1cd5ebd140fc995b6
2 changes: 1 addition & 1 deletion python2/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ def _type_check(arg, msg):
if (
type(arg).__name__ in ('_Union', '_Optional') and
not getattr(arg, '__origin__', None) or
isinstance(arg, TypingMeta) and _gorg(arg) in (Generic, Protocol)
isinstance(arg, TypingMeta) and arg._gorg in (Generic, Protocol)
):
raise TypeError("Plain %s is not valid as type argument" % arg)
return arg
Expand Down
2 changes: 1 addition & 1 deletion src/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ def _type_check(arg, msg):
if (
type(arg).__name__ in ('_Union', '_Optional') and
not getattr(arg, '__origin__', None) or
isinstance(arg, TypingMeta) and _gorg(arg) in (Generic, Protocol)
isinstance(arg, TypingMeta) and arg._gorg in (Generic, Protocol)
):
raise TypeError("Plain %s is not valid as type argument" % arg)
return arg
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.