Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Description
The following code fails mypy tmp.py:
importasyncioclassMyEventLoopPolicy(asyncio.DefaultEventLoopPolicy): passwith:
tmp.py:3: error: Variable "asyncio.DefaultEventLoopPolicy" is not valid as a type tmp.py:3: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases tmp.py:3: error: Invalid base class "asyncio.DefaultEventLoopPolicy" Found 2 errors in 1 file (checked 1 source file) This MWE is copied from the Python docs here: https://docs.python.org/3/library/asyncio-policy.html#custom-policies.
Maybe this is because of the assignment here:
typeshed/stdlib/asyncio/unix_events.pyi
Lines 94 to 99 in fd750bf
| class_UnixDefaultEventLoopPolicy(BaseDefaultEventLoopPolicy): | |
| defget_child_watcher(self) ->AbstractChildWatcher: ... | |
| defset_child_watcher(self, watcher: AbstractChildWatcher|None) ->None: ... | |
| SelectorEventLoop=_UnixSelectorEventLoop | |
| DefaultEventLoopPolicy=_UnixDefaultEventLoopPolicy |
Metadata
Metadata
Assignees
Labels
No labels