Skip to content

mypy errors with AsyncioExecutor(loop=asyncio.get_event_loop()) #272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
blazewicz opened this issue Mar 23, 2020 · 0 comments · Fixed by #273
Closed

mypy errors with AsyncioExecutor(loop=asyncio.get_event_loop()) #272

blazewicz opened this issue Mar 23, 2020 · 0 comments · Fixed by #273

Comments

@blazewicz
Copy link
Contributor

With current version of mypy any project using AsyncioExecutor with loop= argument provided as follows:

executor = AsyncioExecutor(loop=asyncio.get_event_loop())

fails type check with following error

***: error: Argument "loop" to "AsyncioExecutor" has incompatible type "AbstractEventLoop"; expected "Optional[_UnixSelectorEventLoop]"

Basically asyncio.get_event_loop() returns asyncio.AbstractEventLoop object, and AsyncioExecutor expects asyncio._UnixSelectorEventLoop.

type definition:

# type: (Optional[_UnixSelectorEventLoop]) -> None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant