-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
bugmypy got something wrongmypy got something wrong
Description
from typing import Optional
from typing import Sequence
from more_itertools import first
class A:
def some_method(self):
pass
def f(inp: Sequence[A]) -> Optional[A]:
return first(filter(lambda a: a.some_method(), inp), None)
Output
test.py:13: error: Item "None" of "Optional[A]" has no attribute "some_method"
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrong