-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Fails mypy --strict because of reexports #3868
Copy link
Copy link
Closed
Labels
Description
Long story short
With python 3.7, fresh mypy 0.711:
import aiohttp
aiohttp.ClientSession% mypy --strict test.py
test.py:3: error: Module has no attribute "ClientSession"
This happens because mypy --strict expects imported stuff reexported as in
from .client import BaseConnector as BaseConnectorwhile aiohttp/__init.py__ just imports stuff:
from .client import (BaseConnector, ...)Related: python/mypy#7067
Expected behaviour
Clean mypy --strict, as these errors break checking code which uses aiohttp
Reactions are currently unavailable