-
-
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
Invalid module import error (no-name-in-module) #9387
Labels
Duplicate 🐫
Duplicate of an already existing issue
Comments
martinnovak
added
the
Needs triage 📥
Just created, needs acknowledgment, triage, and proper labelling
label
Jan 25, 2024
Duplicate of #6535 |
jacobtylerwalls
added
Duplicate 🐫
Duplicate of an already existing issue
and removed
Needs triage 📥
Just created, needs acknowledgment, triage, and proper labelling
labels
Jan 25, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug description
When you have a module utils/collections.py and in other folder, you have utils2/main.py, pytlint reports
util2/main.py:1:0: E0611: No name 'namedtuple' in module 'collections' (no-name-in-module)
Whereas when running python, there is no problem with running
python3 util2/main.py
I guess this is false positive error.
I created a simple repo where you can test the problem https://github.com/martinnovak/pylint-bug/
Configuration
No response
Command used
pylint .
Pylint output
Expected behavior
I expect to run with no error.
Pylint version
(pylint-bug) mango:~/pylint-bug$ pylint --version pylint 3.0.3 astroid 3.0.2 Python 3.11.7 (main, Dec 4 2023, 18:10:11) [Clang 15.0.0 (clang-1500.1.0.2.5)]
OS / Environment
macOS 14.3 (23D56)
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: