-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Don't require -> None
on __init__
#3358
Comments
This was already considered, see this section of PEP 484:
|
That's reasonable. I guess I can adjust my IDE snippet to just include it |
For others who end up here, it looks like this point is still open for debate in #604 (and perhaps this should be marked as a Duplicate that issue). This quote from Guido is worth considering: #604 (comment)
I'm with him on that. |
Is there any way to disable this particular warning? |
What warning? You no longer need to put a return type on |
@gvanrossum Ah sorry, I was on an old mypy version. Thanks for your help! |
There's no code where
__init__
should return anything exceptNone
, so requiring-> None
on it is just useless boilerplate.I think it should be permitted to omit it, and that it should be inferred, as with
self
parameters not requiring annotation.The text was updated successfully, but these errors were encountered: