-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
asyncio
: make AbstractServer
abstract and remove unnecessary metaclass=ABCMeta
#7185
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
Conversation
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
asyncio
: make several classes abstractasyncio
: make AbstractServer
abstract
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
Neither of these seems to be necessary. |
I think the metaclass lie is actually necessary for both of these classes, unfortunately. If we do not lie about the metaclass, then mypy will complain about not all The way to get mypy to accept that the subclass is also meant to be abstract, even though it defines no But, let me check... |
|
Okay, let's try it |
asyncio
: make AbstractServer
abstractasyncio
: make AbstractServer
abstract and remove unnecessary metaclass=ABCMeta
This comment has been minimized.
This comment has been minimized.
1 similar comment
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
I've been fiddling about with a script to identify functions that:
None
at runtime.None
at runtime.One thing the script has identified is that there seem to be a bunch of classes in
asyncio
that are not marked as being abstract in typeshed, but look awfully like they're intended to be abstract at runtime.