-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Infinite recursion, while loading numpy
modules
#155
Comments
Should be fixed in 0.27.3, let me know otherwise 🙂 |
@pawamoy Thanks a lot! By the way is there an easier way to load a module/function into griffe by using the imported instance of function, module? |
Oh yes sorry I forgot to answer that. It's actually not clear from the code or documentation but you can pass any qualified name to full_qualname = f"{func.__module__}.{func.__qualname__}"
sig = griffe.load(full_qualname) Of interest as well is the modules collection, that you can reuse when loading things or accessing objects: from griffe import load
from griffe.collections import ModulesCollection
modules_collection = ModulesCollection()
# ...later
full_qualname = f"{func.__module__}.{func.__qualname__}"
try:
sig = modules_collection[full_qualname]
except KeyError:
sig = load(full_qualname, modules_collection=modules_collection) |
Seems like I can still reproduce this issue with |
What version of Numpy do you have? |
|
Thanks, I was able to replicate and fix the issue. I'll push the fix soon 🙂 |
Awesome, thanks! |
Will push a new release soon. |
Describe the bug
We're trying to use
griffe
in https://github.com/jupyter/papyri (See PR: jupyter/papyri#250) to get structured function signatures. However we had a roadblock while loading numpy modules, we see infinite recursion.To Reproduce
Steps to reproduce the behavior:
Expected behavior
We expect to get modules instead of infinite recursion.
Screenshots
If applicable, add screenshots to help explain your problem.
System (please complete the following information):
griffe
version:0.27.1
3.9.16
Additional context
Add any other context about the problem here.
Another question we wanted to ask: is there an easier way to load a module/function into griffe by using the imported instance of function, module?
The text was updated successfully, but these errors were encountered: