-
-
Notifications
You must be signed in to change notification settings - Fork 497
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
Resolving Python Symbols with Wildcard Imports #1953
Comments
This kind of stuff is well supported within Jedi. It even works in places like numpy that does nested star imports. I feel like you have either an outdated Jedi version or you are not using Jedi (accidentally) or most likely there's an issue with your sys path or the sys path you provide to Jedi. If you want me to help, you have to write a full reproduction with a zip archive that I could look at. Also note that this is a feature we have had zero complaints about for probably 7+ years. It is also automatically tested. |
Does jedi support wild card import and unto what extent?
I've been using this library to analyze a Python project and extract symbol definitions and references. But I've encountered an issue when dealing with wildcard imports (
import *
).Example:
Consider the following code structure:
When I try to resolve the
check_files_in_directory
function inmain.py
, it fails to determine its origin due to the wildcard import.What I've tried:
I've successfully resolved symbols for explicit imports, e.g.,
from utils import check_files_in_directory
.Question:
Is there a way to make
jedi
resolve symbols imported with wildcard imports effectively? I understand wildcard imports can be challenging for static analysis tools since they obfuscate the origin of symbols. **Do I have to set some configuration? For my case, even if it the analysis takes time and it is slow to resolve it, that is not a problem.The text was updated successfully, but these errors were encountered: