Skip to content
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 negatives 'no-member' and 'no-name-in-module' due to repeated module names #802

Closed
allanlewis opened this issue Jan 29, 2016 · 2 comments

Comments

@allanlewis
Copy link

I have some code structured a bit like this:

foo.py
package
| - foo.py

(Sorry for my poor ASCII art skills! Feel free to edit... Basically, I mean I have foo.py in root and another foo.py in a package package.)

If in one file (not shown above) I import foo, and in another file I do import package.foo, then Pylint seems to get confused by the two files with the same base-name. The result is that calls to members of foo in one file when those members don't exist in package.foo cause spurious no-member and no-name-in-module warnings from Pylint. I haven't tried out this minimal example - my repo is much more complex - but I think it would reproduce the issue.

(My precise situation is that I have a "library" directory on my PYTHONPATH containing both a module foo and a package itself containing a module foo. The files importing these modules are outside of library and are not on the PYTHONPATH.)

@PCManticore
Copy link
Contributor

Hey,

Sorry for taking so long to respond to this issue! I'm trying to reproduce it using your instructions, but I'm not able to do it, can you pinpoint the failure exactly and maybe give us a sample structure with some code that emits this? Include the output as well, please, since it can help us track it easily.

@PCManticore
Copy link
Contributor

Closing, as there was no further comment from the op. Please reopen the issue if a sample can be provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants