griffe
griffe copied to clipboard
Cannot resolve builtin `typing` modules.: `griffe.exceptions.AliasResolutionError: Could not resolve typing.Dict`
I get this cryptic message now when I build my docs. No idea why. Dug around the code base and am lost. typing is a built in module so this is super confusing.
griffe.exceptions.AliasResolutionError: Could not resolve typing.Dict
nox > Command mkdocs build failed with exit code 1
nox > Session mkdocs failed.
Could you share the full traceback :slightly_smiling_face: ? Also, do you have a public repository that I can use to replicate?
Can do! I am and have been on vacation (now).
Will do when I am back! I copy pasted that error from my phone (fyi) so limited stack.
Hi @jessekrubin! Any chance you could share that traceback :smile:? I'm slowly getting back to Griffe after a long and busy time :slightly_smiling_face:
Gentle ping! @jessekrubin
Pinging you again @jessekrubin :grinning: Please let me know if you'd like I stop pinging you :smile:
Oof I just saw your comments! Sorry! I haven't been super python focused lately. I'll take a look this weekend if I have time!
Ps feel free to ping whenever.
It's totally fine! Glad to hear from you :smile: I'll ping again in a month :imp:
Actually I fixed a number of alias related issues, so I'll close this for now, feel free to reopen or to open a new issue if you ever encounter it again!
@pawamoy sounds good! I am swamped and my head is in the land of typescript far away from python.
FWIW: I think when I initially reported this bug I think I was trying to use it for my lib xtyping (https://github.com/dynamic-graphics-inc/dgpy-libs/tree/main/libs/xtyping)...
Thanks, I'll see if I can replicate using this repo :smile:
Damn, it seems obvious now: it's perfectly normal that aliases to typing (which is an external module, relatively to your own package) are not resolved. But of course it should not crash trying, and it does not crash anymore, so this is indeed fixed :smile:
@pawamoy does it actually resolve to the right place tho?
I wrote xtyping because I was tired of importing typing and typing_extensions and remembering what I had to import from where.
It surely picks up the correct location of your imported object, yes. Well, if you ever try again using mkdocstrings/griffe on that project, just let me know how it goes and we'll try to fix any issues arising :slightly_smiling_face:
@pawamoy sounds good! also checkout the rest o my libs in dgpy-libs (if you have time)!
Sure, can try to load/dump each one of them with Griffe to see if there's any issue :slightly_smiling_face:
@pawamoy not a bad idea! I was just saying my libs are (IMO) weird and cool! Dumping each lib's docs would be a good test as all of the dgpy-libs libs are fully type annotated!
I like funkify :) Lager seems interesting, any docs on what it offers?
@pawamoy it was originally my python-stdlib-logging config and setup and tools, but then I discovered loguru (which is a fantastic package) and lager is really just a collection utils surrounding loguru (with a better name IMO -- it also has super fast json logging ifyou install jsonbourne (in the same repo)).