Add __all__ for asyncio.unix_events & asyncio.taskgroups, and simplify asyncio.__init__#7343
Add __all__ for asyncio.unix_events & asyncio.taskgroups, and simplify asyncio.__init__#7343srittau merged 4 commits intopython:masterfrom
__all__ for asyncio.unix_events & asyncio.taskgroups, and simplify asyncio.__init__#7343Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
asyncio.__init____all__ for aysncio.unix_events & asyncio.taskgroups, & simplify asyncio.__init__
__all__ for aysncio.unix_events & asyncio.taskgroups, & simplify asyncio.__init____all__ for aysncio.unix_events & asyncio.taskgroups, and simplify asyncio.__init__
|
@rchen152, any idea what the pytype error is trying to tell me? 🙂 |
This comment has been minimized.
This comment has been minimized.
__all__ for aysncio.unix_events & asyncio.taskgroups, and simplify asyncio.__init____all__ for asyncio.unix_events & asyncio.taskgroups, and simplify asyncio.__init__
|
Looks like pytype is either not allowing |
Thank you!! |
* __all__ should always be skipped. * Underscore-prefixed TypeVar definitions are obviously not meant to be exported. See python/typeshed#7343. PiperOrigin-RevId: 430327362
|
I've submitted a fix for this; as long as I don't run into any unexpected problems, I should be able to cut a pytype release containing the fix tomorrow or Thursday. |
|
Alright, pytype-2022.2.23 is out. Let me know if you run into any problems. |
Unblocks python#7343
Looks like it's working great — thanks for the quick fix! |
|
Diff from mypy_primer, showing the effect of this PR on open source code: core (https://github.com/home-assistant/core)
+ homeassistant/runner.py:51: error: Unused "type: ignore[misc, valid-type]" comment
+ homeassistant/runner.py:62: error: "HassEventLoopPolicy" has no attribute "_loop_factory" [attr-defined]
|
|
Ping on this -- the CI is green now that the pytype version used in CI has been updated :) |
srittau
left a comment
There was a problem hiding this comment.
While I'm a tad worried about the second line in the primer output, this can be sorted out later if necessary.
Now that all
asynciosubmodules have accurate__all__s, we can drastically simplify the imports inasyncio.__init__.pyiand do something much more similar to what's done at runtime.