Skip to content

Commit a820f7f

Browse files
committed
test: clarify override of method
1 parent 63e5a5b commit a820f7f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Lib/test/test_typing.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4557,6 +4557,7 @@ class Commentable(Protocol):
45574557
def test_isinstance_with_deferred_evaluation_of_annotations(self):
45584558
@runtime_checkable
45594559
class P(Protocol):
4560+
x: int
45604561
def meth(self):
45614562
...
45624563

@@ -4572,6 +4573,7 @@ def __init__(self):
45724573
def meth(self):
45734574
...
45744575

4576+
# override meth with a non-method attribute to make it part of __annotations__ instead of __dict__
45754577
class SubProtocol(P, Protocol):
45764578
meth: undefined
45774579

0 commit comments

Comments
 (0)