-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Don't emit super-init-not-called
for abstract __init__
methods
#7227
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
Conversation
Pull Request Test Coverage Report for Build 2770142168
💛 - Coveralls |
I have no idea why the coverage went down on the three lines that are not covered anymore. coverall issue ? |
This comment has been minimized.
This comment has been minimized.
I think this is because "living" objects don't have a body and thus are considered abstract. See also change to the ctypes test |
@Pierre-Sassoulas can this be merged with the decreased coverage? |
Maybe it's possible to cleanup or to add a test that cover this ? If it's too complicated I'm ok with merging as is, the primer indicate the change will remove a lot of false positives. |
I think, it might be an very bad idea to change |
Look like the fail is genuine and was hidden by the broken main before. |
This comment has been minimized.
This comment has been minimized.
@@ -2061,9 +2061,6 @@ def _check_init(self, node: nodes.FunctionDef, klass_node: nodes.ClassDef) -> No | |||
|
|||
if decorated_with(node, ["typing.overload"]): | |||
continue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The lines below are no longer necessary now that we skip object.__init__
because of its abstractness.
return "Implemented" | ||
|
||
|
||
class DerivedFrom(UnknownParent): # [undefined-variable] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a regression test for the coverage that dropped. We try to infer bases which fails here.
🤖 Effect of this PR on checked open source code: 🤖 Effect on django:
Effect on flask:
Effect on pandas:
Effect on psycopg:
Effect on pytest:
Effect on sentry:
This comment was generated for commit 03dd537 |
doc/whatsnew/<current release.rst>
.Type of Changes
Description
Closes #3975.