Skip to content

Commit 23ebfe7

Browse files
authored
[ty] Fix tiny mistake in protocol tests (#20743)
1 parent f90d646 commit 23ebfe7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

crates/ty_python_semantic/resources/mdtest/protocols.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -964,11 +964,14 @@ class Foo(Protocol):
964964

965965
def __init__(self) -> None:
966966
self.x = 42 # fine
967+
967968
self.a = 56 # TODO: should emit diagnostic
968969
self.b: int = 128 # TODO: should emit diagnostic
969970

970971
def non_init_method(self) -> None:
971-
self.y = 64 # fine
972+
self.x = 64 # fine
973+
self.y = "bar" # fine
974+
972975
self.c = 72 # TODO: should emit diagnostic
973976

974977
# Note: the list of members does not include `a`, `b` or `c`,

0 commit comments

Comments
 (0)