Skip to content
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

Update common issues to include __init__ without arguments (#8303) #15

Merged
merged 1 commit into from
Jan 26, 2020

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