-
-
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
Crash on some mypy import when using the --extension-pkg-allow-list=mypy #10223
Comments
What is |
It's probably this class https://github.com/python/mypy/blob/52c7735ff9e0a1e60c80a31bf6ffd0b0d0d7d8a9/mypy/build.py#L1805 but mypy do a prebuild, and it has this kind or side effect! >>> import mypy.build
>>> mypy.build.ModuleNotFound().__dict__
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'ModuleNotFound' object has no attribute '__dict__'. Did you mean: '__dir__'? |
Ah, it is likely do to this change in That might cause more issues in the code, but I guess it makes sense to guard against this. Thanks! |
Also running into this crash with the SageMath library, from sage.numerical import mip Versions: pylint 3.3.4
astroid 3.3.8
Python 3.13.2 (main, Feb 5 2025, 08:05:21) [GCC 14.2.1 20250128] |
Bug description
When parsing the following
example.py
:Configuration
Command used
Pylint output
Expected behavior
No crash
Pylint version
OS / Environment
linux (Linux)
Additional dependencies
The text was updated successfully, but these errors were encountered: