You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it be possible to abstract the implementation? From what I see this currently relies on ast module, but if we were to provide a similar python interface, could it work to extend to non-python source as well?
The text was updated successfully, but these errors were encountered:
Hi! That's an interesting idea for sure. I think it'd be quite a lot of work, because not only do we rely on AST, but also largely the project being importable to extract type hints. Not sure about Sphinx internals there, maybe there's something we could use if other languages report types too. What would you use it for?
but also largely the project being importable to extract type hints
I could use a reference for this to understand. I thought this is still left to the predefined domain role and rely on whatever autoapi was used to extract them.
Not sure about Sphinx internals there, maybe there's something we could use if other languages report types too
For this would the language specific domains be useful, e.g. C++ (also definition). In the sense that you can assume there is a dict between an ast type and one of a sphinx domain role or a function that would translate it?
What would you use it for?
Given that there is already upstream domain and ast implementation for C/C++ I would start there, without autosphinx support if it makes sense.
This whole module, starting from the top does the resolving! It's more than just linking AST to Sphinx inventories. When we use a method of a class in code, we need to determine what comes out. And maybe what you described is exactly it, I'll have to have a look later on!
felix-hilden
changed the title
Abstract the implementation
Abstract the implementation to support other languages
Jan 9, 2025
Would it be possible to abstract the implementation? From what I see this currently relies on
ast
module, but if we were to provide a similar python interface, could it work to extend to non-python source as well?The text was updated successfully, but these errors were encountered: