Closed as not planned
Description
test.py:
from contextlib import ExitStack
def context_manager_with_return_bug() -> int:
with ExitStack() as stack:
return 5
mypy complains: test.py:3: error: Missing return statement
Oddly this only seems to happen when using ExitStack specifically - no other context manager, based on other functions / classes / etc, in my codebase triggers this bug.