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

Invalid module import error (no-name-in-module) #9387

Closed
martinnovak opened this issue Jan 25, 2024 · 1 comment
Closed

Invalid module import error (no-name-in-module) #9387

martinnovak opened this issue Jan 25, 2024 · 1 comment
Labels
Duplicate 🐫 Duplicate of an already existing issue

Comments

@martinnovak
Copy link

martinnovak commented Jan 25, 2024

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

(pylint-bug) mango:~/pylint-bug$ pylint .
************* Module main
util2/main.py:1:0: E0611: No name 'namedtuple' in module 'collections' (no-name-in-module)

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

@martinnovak martinnovak added the Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling label Jan 25, 2024
@jacobtylerwalls
Copy link
Member

Duplicate of #6535

@jacobtylerwalls jacobtylerwalls marked this as a duplicate of #6535 Jan 25, 2024
@jacobtylerwalls jacobtylerwalls closed this as not planned Won't fix, can't repro, duplicate, stale Jan 25, 2024
@jacobtylerwalls 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
Labels
Duplicate 🐫 Duplicate of an already existing issue
Projects
None yet
Development

No branches or pull requests

2 participants