KEMBAR78
Improve error message for direct __init__ calls by hauntsaninja · Pull Request #13183 · python/mypy · GitHub
Skip to content

Conversation

hauntsaninja
Copy link
Collaborator

Resolves #13173

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

steam.py (https://github.com/Gobot1234/steam.py)
- steam/protobufs/struct_messages.py:33: error: Cannot access "__init__" directly  [misc]
+ steam/protobufs/struct_messages.py:33: error: Accessing "__init__" on an instance is unsound, since instance.__init__ could be from an incompatible subclass  [misc]

discord.py (https://github.com/Rapptz/discord.py)
- discord/ext/commands/core.py:534: error: Cannot access "__init__" directly
+ discord/ext/commands/core.py:534: error: Accessing "__init__" on an instance is unsound, since instance.__init__ could be from an incompatible subclass

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

LGTM

@hauntsaninja hauntsaninja merged commit 28258d0 into python:master Jul 19, 2022
@hauntsaninja hauntsaninja deleted the call-init branch July 19, 2022 21:23
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.

Cannot access "__init__" directly

3 participants