KEMBAR78
Update common issues to include __init__ without arguments (#8303) by sthagen · Pull Request #15 · sthagen/python-mypy · GitHub
Skip to content

Conversation

@sthagen
Copy link
Owner

@sthagen sthagen commented Jan 26, 2020

This is the implication of python#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".

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".
@sthagen sthagen merged commit c8de91e into sthagen:master Jan 26, 2020
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