-
Notifications
You must be signed in to change notification settings - Fork 20
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
__init__
return type should only be annotated if it has no args
#47
Comments
I would prefer to keep annotating It wouldn't be terribly difficult to skip adding a return annotation to |
Yes, agreed the latter is the desirable behaviour - otherwise it ends up adding needless boilerplate. Does the fact that it's not terribly difficult mean we could see this land soon in autotyping, or that I'm welcome to file a PR for it? :P |
No, I'd like to keep the current behavior of always annotating |
I'd accept a new option like |
Alright - I'll see if I can get that to work and file a PR when I do. If I don't reply back in a few days this can probably be closed as a wontfix. |
Mypy has not required
__init__
to have a-> None
return annotation for a while (except in the cases of no-arg constructors). I was able to disable it entirely by monkeypatchingSIMPLE_MAGICS
, but it feels like a more proper solution that distinguishes between no-arg and some-arg constructors would be appropriate here.@JelleZijlstra would such a change be trivial to add?
The text was updated successfully, but these errors were encountered: