sphinx-codeautolink
sphinx-codeautolink copied to clipboard
Use mypy for type resolving..? 🤔
Wild idea... could we use mypy for resolving types in code examples? It is static analysis after all, and very comprehensive. I wonder if there is mypy internal we could use instead of parsing ourselves.
I explored various ways of doing this for libcst: https://github.com/Instagram/LibCST/issues/947 there are ways of achieving it, but nothing that's super clean.
Interesting, thank you!