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
Pylint is crashing with astroid.exceptions.StatementMissing: Statement not found on <Module.builtins l.0 #8079
Comments
This is probably related to us thinking that every |
I agree that we shouldn't overwrite builtin functions, I was just hoping to prevent a crash. I am unsure if I can rename a field so easily without breaking some API. So the possibility to ignore the normally raised linting error until we provide a good fix would be very welcome. EDIT: I renamed the problematic function, so I have my work around. Feel free to close if you think this is an expected behavior. |
Good to hear you fixed it! This is definitely something we should fix but will probably be low priority as it has minimal impact and can hopefully be averted by small refactors by users. |
I'm not sure we should fix, checking that a bultin is indeed a builtin is going to cost an enormous amount of computing power over all pylint users for this one use case. I think we should consider modified builtins an unsupported broken environment. |
It feels though as if we are incorrectly populating the cache with |
Is the problem only reproducible in when using |
Running without jobs allows pylint to finish and report some more expressive error message, it feels less like a crash:
|
Aha, so we have two problems! The underlying issue and then a |
Bug description
Pylint is crashing with:
The line of code that is crashing pylint is:
https://dev.funkwhale.audio/jooola/funkwhale/-/blob/pylint_bug_licence/api/funkwhale_api/music/factories.py#L155
When renaming
licence
tolicense_
pylint doesn't crash.You can clone the branch and run pylint:
git clone -b pylint_bug_licence https://dev.funkwhale.audio/jooola/funkwhale cd funkwhale/api poetry install poetry run pylint \ --jobs=4 \ --output-format=colorized \ --recursive=true \ funkwhale_api/music/factories.py
Configuration
Command used
Pylint output
Expected behavior
Pylint should print a linting error, instead of crashing.
Pylint version
OS / Environment
Debian Bullseye
Additional dependencies
$ poetry show pylint
name : pylint
version : 2.15.6
description : python code static checker
dependencies
required by
$ poetry show pylint-django
name : pylint-django
version : 2.5.3
description : A Pylint plugin to help Pylint understand the Django web framework
dependencies
The text was updated successfully, but these errors were encountered: