Skip to content
Merged
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
Next Next commit
Clarify error message for non @runtime_checkable decorated protocols
  • Loading branch information
XuehaiPan committed May 23, 2023
commit 6b0faa7c245d8f32c15c930799f7b85edd875f29
2 changes: 1 addition & 1 deletion src/typing_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ def _proto_hook(other):
if _allow_reckless_class_checks():
return NotImplemented
raise TypeError("Instance and class checks can only be used with"
" @runtime protocols")
" @runtime_checkable protocols")
if not isinstance(other, type):
# Same error as for issubclass(1, int)
raise TypeError('issubclass() arg 1 must be a class')
Expand Down