-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
False positive for E0710 and E0712 #9047
Comments
This isn't something I can reproduce as-is. Perhaps a pylint configuration in a file such as .pylintrc, pyproject.toml, setup.py or tox.ini is affecting the outcome for you. |
I made sure to disable my personal pylintrc, and the project does not have one, but maybe the Visual Studio Code embedded I've switched from the embedded I'll keep testing and trying to find a consistent reproducible scenario, but I'm starting to think that the problem is in the embedded version of Visual Studio Code, or maybe the extension itself, rather than I'll post here any news. Thanks for your reply. |
The problem definitely lies within Visual Studio Code: the errors disappear if I restart the I suspect that the linting server is not getting the entire code in one go, and sometimes is getting only part of it, missing the points where the custom errors are declared and derive from I'll report in Visual Studio Code or in the Meanwhile I'm closing this bug since it does not seem to be caused by Thanks a lot and sorry for the noise 😉 |
Thanks for the report! |
Bug description
I'm getting two false positives for errors E0710 and E0712, the first one at line 24 and the second one at line 29 of the code below.
Yes, the code is incredibly weird but the errors happened in a much bigger code I wrote and I've pruned and simplified it until the errors disappeared. The same code does not give any errors if any of the lines is removed, and that leads me to think the cause is some weird interaction of the imported code, code length, etc. Some corner case bug.
But the real problem is that I cannot reproduce this error consistently. Sometimes, in order to reproduce it, I have to close my IDE (Visual Studio Code) and relaunch. I'm reporting this here just in case other person has the same problem with a more consistent way of reproducing the problem, so there's at least something appearing on searches.
Thanks a lot in advance, and feel free to ask me for any additional information needed.
Configuration
No response
Command used
Pylint output
Expected behavior
No errors since the code is perfectly valid and in fact the new exception inherits from
Exception
.Pylint version
OS / Environment
Windows 10 Home 64 bit, embedded Pylint for Visual Studio Code 1.82.2
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: