Skip to content

Conversation

asvetlov
Copy link
Contributor

These methods return True if reader/writer was previously set, False otherwise.

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@srittau
Copy link
Collaborator

srittau commented Jan 26, 2022

We should also change the return type in AbstractEventLoop.

@asvetlov
Copy link
Contributor Author

Correct, thanks. Fixed.

@github-actions
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

tornado (https://github.com/tornadoweb/tornado)
+ tornado/platform/asyncio.py:641: error: Return type "None" of "remove_reader" incompatible with return type "bool" in supertype "AbstractEventLoop"
+ tornado/platform/asyncio.py:645: error: Return type "None" of "remove_writer" incompatible with return type "bool" in supertype "AbstractEventLoop"

@asvetlov
Copy link
Contributor Author

asvetlov commented Jan 26, 2022

Tornado is slightly incompatible with the reference asyncio implementation, sorry.
The boolean was returned from these methods starting from the very first asyncio release, please trust me :)

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 this pull request may close these issues.

2 participants