KEMBAR78
Update common issues to include __init__ without arguments by le0tan · Pull Request #8303 · python/mypy · GitHub
Skip to content

Conversation

le0tan
Copy link
Contributor

@le0tan le0tan commented Jan 19, 2020

This is the implication of #5677 where the return type of __init__ is inferred given that at least one argument is typed.

However, if no argument is present in __init__, -> None becomes compulsory if we are to enable type-checking on that method without using --check-untyped-defs flag. I believe it is worth mentioning in the section of "No errors reported for obviously wrong code".

- common issues and solutions -> No errors reported for obviously wrong
code
@le0tan le0tan requested a review from JukkaL January 19, 2020 07:57
@le0tan
Copy link
Contributor Author

le0tan commented Jan 19, 2020

This should close #8289 as well.

Copy link
Member

@ilevkivskyi ilevkivskyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks! (I just made one minor formatting tweak.)

@ilevkivskyi ilevkivskyi merged commit 41b40aa into python:master Jan 25, 2020
sthagen added a commit to sthagen/python-mypy that referenced this pull request Jan 26, 2020
Update common issues to include __init__ without arguments (python#8303)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants