mirror of https://github.com/astral-sh/ruff
[ty] Fix tiny mistake in protocol tests (#20743)
This commit is contained in:
parent
f90d6466e0
commit
23ebfe7777
|
|
@ -964,11 +964,14 @@ class Foo(Protocol):
|
||||||
|
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
self.x = 42 # fine
|
self.x = 42 # fine
|
||||||
|
|
||||||
self.a = 56 # TODO: should emit diagnostic
|
self.a = 56 # TODO: should emit diagnostic
|
||||||
self.b: int = 128 # TODO: should emit diagnostic
|
self.b: int = 128 # TODO: should emit diagnostic
|
||||||
|
|
||||||
def non_init_method(self) -> None:
|
def non_init_method(self) -> None:
|
||||||
self.y = 64 # fine
|
self.x = 64 # fine
|
||||||
|
self.y = "bar" # fine
|
||||||
|
|
||||||
self.c = 72 # TODO: should emit diagnostic
|
self.c = 72 # TODO: should emit diagnostic
|
||||||
|
|
||||||
# Note: the list of members does not include `a`, `b` or `c`,
|
# Note: the list of members does not include `a`, `b` or `c`,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue