-
-
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
Functions annotated to return None can't return function calls returning None #2828
Comments
One of the tests explicitly disallows this, which is the cause for my PR #2829 failing. I've removed it in the PR, but is there a reason to have it there in the first place? |
I have a feeling that this has been discussed earlier. Anyway, it's a matter of style -- the code is clearly correct. I wonder if @gvanrossum has an opinion whether |
I'm torn, since I sometimes do this myself, but I do think it's a (very slight) code smell. I also think that |
For what it's worth, this is allowed with |
If it's only a very slight code smell, mypy should perhaps not complain about it. |
Agreed.
|
This is fixed |
Minimal example:
Sorry for the poor issue naming, not sure how else to describe this.
The text was updated successfully, but these errors were encountered: