-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[feature request] option to assume None as return type #12695
Comments
Duplicate of #10149 |
@AlexWaygood That is not at all the feature that I'm requesting. I don't want it to infer anything. I want it to always just assume This would still require the annotation for any other return type. |
Okay, I suppose this functionality could be implemented behind a flag. Apologies for the misdiagnosis :) I think it's highly unlikely that this functionality will be implemented, though, unless you'd like to submit a PR to make it happen (and even then, nothing's guaranteed; new flags generally aren't added lightly). |
This looks like a duplicate of #9413. |
Yup. Thanks @pranavrajpal. |
Feature
an option to assume
None
as the return type if there is no return type annotation(With this option,
disallow-untyped-defs
would only make sure all parameters are typed.)Pitch
Putting
-> None
on every function that doesn't return a value adds a lot of clutter, but it's required in order to enforce that all the parameters are typed.(And making sure all the parameters are typed is required to get all of the available static typing analysis benefits.)
The text was updated successfully, but these errors were encountered: