-
-
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
Contents of native modules not found when running in a virtualenv #3499
Comments
A similar situation occurs for the |
Hmm, this is odd. For modules from standard library that are in native code, we should be able to properly analyze them already, since they are automatically imported and we build an AST from the live representation. I'm not able to reproduce the issue with
|
Weird... To make sure it is not something in my project, I created a fresh virtualenv and installed
When I run it under This is on x86-64 Linux, openSUSE Tumbleweed. There is no error if I try to run the source file containing the two imports. Any hints on what I should investigate next? |
I think I found something:
So it seems the |
When I run Astroid's unit tests from within a virtualenv, four of them fail, including this one:
However, if I run the tests outside of a virtualenv, all of them pass. |
Closes pylint-dev#1470 Closes pylint-dev#3499 Closes pylint-dev#4302 Closes pylint-dev#4798 Closes pylint-dev#5081
Steps to reproduce
Lint this code:
Current behavior
Expected behavior
No error is reported, since the class
struct.Struct
exists. This class is implemented in native code, which is probably why PyLint cannot discover it. However, since it is part of the standard library, I think it would be good to have dedicated support for it.pylint --version output
The text was updated successfully, but these errors were encountered: