We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63ca2a1 commit 72a596aCopy full SHA for 72a596a
test-data/unit/check-statements.test
@@ -2289,11 +2289,12 @@ from collections.abc import Iterator
2289
class A:
2290
def list(self) -> None: ...
2291
2292
- def foo(self) -> list[int]:
+ def foo(self) -> list[int]: # E: Function "__main__.A.list" is not valid as a type \
2293
+ # N: Perhaps you need "Callable[...]" or a callback protocol?
2294
return []
2295
2296
def fn() -> Iterator[int]:
- yield from A().foo()
2297
+ yield from A().foo() # E: "list?[builtins.int]" has no attribute "__iter__" (not iterable)
2298
[builtins fixtures/tuple.pyi]
2299
2300
[case testNoCrashOnStarRightHandSide]
0 commit comments