8000 gh-112345: Let failed protocol subclasscheck show non-method members by randolf-scholz · Pull Request #112344 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-112345: Let failed protocol subclasscheck show non-method members #112344

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Nov 24, 2023
Prev Previous commit
Update Lib/test/test_typing.py
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
  • Loading branch information
randolf-scholz and AlexWaygood authored Nov 24, 2023
commit 62b6f71c79d0615b9b824090f406e55927a030b9
2 changes: 1 addition & 1 deletion Lib/test/test_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -4102,7 +4102,7 @@ def square_norm(self) -> float:
self.assertEqual(Vec2D.__protocol_attrs__, {'x', 'y', 'square_norm'})
expected_error_message = (
"Protocols with non-method members don't support issubclass()."
" Non-method members: ['x', 'y']."
" Non-method members: 'x', 'y'."
)
with self.assertRaisesRegex(TypeError, re.escape(expected_error_message)):
issubclass(int, Vec2D)
Expand Down
0