Fix tests

This commit is contained in:
David Peter 2025-10-22 16:50:29 +02:00
parent 249a807665
commit 0db8d41873
1 changed files with 2 additions and 10 deletions

View File

@ -401,19 +401,9 @@ class TupleIterable:
class C: class C:
def __init__(self) -> None: def __init__(self) -> None:
# TODO: Should not emit this diagnostic
# error: [unresolved-attribute]
[... for self.a in IntIterable()] [... for self.a in IntIterable()]
# TODO: Should not emit this diagnostic
# error: [unresolved-attribute]
# error: [unresolved-attribute]
[... for (self.b, self.c) in TupleIterable()] [... for (self.b, self.c) in TupleIterable()]
# TODO: Should not emit this diagnostic
# error: [unresolved-attribute]
# error: [unresolved-attribute]
[... for self.d in IntIterable() for self.e in IntIterable()] [... for self.d in IntIterable() for self.e in IntIterable()]
# TODO: Should not emit this diagnostic
# error: [unresolved-attribute]
[[... for self.f in IntIterable()] for _ in IntIterable()] [[... for self.f in IntIterable()] for _ in IntIterable()]
[[... for self.g in IntIterable()] for self in [D()]] [[... for self.g in IntIterable()] for self in [D()]]
@ -461,9 +451,11 @@ If the comprehension is inside another scope like function then that attribute i
class C: class C:
def __init__(self): def __init__(self):
def f(): def f():
# error: [unresolved-attribute] "Unresolved attribute `a` on type `Self@__init__`."
[... for self.a in IntIterable()] [... for self.a in IntIterable()]
def g(): def g():
# error: [unresolved-attribute] "Unresolved attribute `b` on type `Self@__init__`."
[... for self.b in IntIterable()] [... for self.b in IntIterable()]
g() g()