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

Source root not correctly used #10026

Closed
Julfried opened this issue Oct 15, 2024 · 0 comments · Fixed by #10036
Closed

Source root not correctly used #10026

Julfried opened this issue Oct 15, 2024 · 0 comments · Fixed by #10036
Labels
Needs investigation 🔬 A bug or crash where it's not immediately obvious what is happenning pyreverse Related to pyreverse component

Comments

@Julfried
Copy link
Contributor

Julfried commented Oct 15, 2024

Bug description

I have a package that sits in a child folder of the current working directory (./src). Now if I want to to run pyreverse for this module I add ./src as a source-root. However pyreverse does not find the module.

Here is an example:

ex/
└── src/
    ├── __init__.py
    └── mymodule/
        ├── __init__.py
        └── testmodule.py

Configuration

No response

Command used

pyreverse -o html --source-root ./src mymodule

Pylint output

raise ImportError(f"No module named {'.'.join(module_parts)}")
ImportError: No module named mymodule

Expected behavior

When specifiy source-roots, pyreverse should also search the modules in this path

Pylint version

pylint 3.3.1
astroid 3.3.5
Python 3.12.7 | packaged by conda-forge | (main, Oct 4 2024, 15:47:54) [MSC v.1941 64 bit (AMD64)]

OS / Environment

win64

Additional dependencies

No response

@Julfried Julfried added the Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling label Oct 15, 2024
@Pierre-Sassoulas Pierre-Sassoulas added pyreverse Related to pyreverse component Needs investigation 🔬 A bug or crash where it's not immediately obvious what is happenning and removed Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling labels Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs investigation 🔬 A bug or crash where it's not immediately obvious what is happenning pyreverse Related to pyreverse component
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants