Closed
Description
The following code fails mypy tmp.py
:
import asyncio
class MyEventLoopPolicy(asyncio.DefaultEventLoopPolicy):
pass
with:
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
Metadata
Metadata
Assignees
Labels
No labels