-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
super-init-not-called
false positive in .pyi
files
#9096
Comments
@Pierre-Sassoulas It feels like a lot of messages might not make sense for Perhaps we should tackle this in a broader effort? Or just call the support experimental and indicate that it is work in progress. |
I'm on mobile so I can't link to the comment where the same problem hapen with another message, but I agree with you: this would benefit from design upfront instead of waiting for an issue related to each message to be opened. |
That doesn't look like something we will fix before |
Are we going to create a list of (un)authorized message for pyi later ? If so I don't see any downsides if we start the implementation with the currently known list of message that should not be raised on pyi in 3.0.1 and either complete it later or invert the conditional to make it an allow list when we get to it ? |
I think the original issue was interpreted different ways by different people; for example some probably want Pylint to ignore I agree this needs a separate issue with a full specification otherwise we have no position on what Pylint intends to do regarding interface files. |
I now realize that there was expectations close to #4813 when asking for pylint to be analyzing pyi files. Right now, we have a bunch of nonsensical checks (super-init-not-called being one), plus all the annoying convention checks (invalid name?) but without inference coming from analyzing the body of the function that would permit to raise accurate important error messages. We closed #4987 (yeah 🎉 !) but that might not be what thumbs-uppers in this high priority issue expected. So to be clear I'm proposing to remove the nonsensical messages that we're currently aware of in 3.0.x, then think about what's nonsensical globally in 3.1.0. In the mid to long term, Taking types into account in pyi as if they were inferred make a lot of sense imo (a lot more than if we also have the content to actually infer from) but that is probably a discussion that needs to happen thoughtfully in #4813. |
I think #9097 is another big issue relating to |
Well said @Pierre-Sassoulas 👍 |
FWIW, this temporary workaround of configuring pylint globally for [pylint.*.pyi] # workaround for https://github.com/pylint-dev/pylint/issues/9096
disable=
invalid-name,
super-init-not-called,
unused-argument, |
another workaround is to use basedpyright instead which improves on pyright's |
Bug description
Configuration
No response
Command used
Pylint output
Expected behavior
no error
Pylint version
OS / Environment
No response
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: