Skip to content

super().__init_subclass__() fails #7352

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

Closed
JelleZijlstra opened this issue Aug 16, 2019 · 1 comment · Fixed by #7355
Closed

super().__init_subclass__() fails #7352

JelleZijlstra opened this issue Aug 16, 2019 · 1 comment · Fixed by #7355
Labels
bug mypy got something wrong false-positive mypy gave an error on correct code priority-0-high

Comments

@JelleZijlstra
Copy link
Member

$ mypy bin/insubcl.py 
bin/insubcl.py:3: error: Too few arguments for "__init_subclass__" of "object"
$ cat bin/insubcl.py 
class X:
    def __init_subclass__(cls) -> None:
        super().__init_subclass__()
$ mypy --version
mypy 0.730+dev.36fcf1d5aa0f5656ac367bc66aba6e390f82ea9a.dirty

This code works correctly at runtime and the latest release accepts it.

@ilevkivskyi ilevkivskyi changed the title super().__init_subclass_() fails super().__init_subclass__() fails Aug 16, 2019
@ilevkivskyi
Copy link
Member

I didn't check, but it is likely a regression caused by #7232

cc @tavianator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong false-positive mypy gave an error on correct code priority-0-high
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants