Open jl-wynen opened 8 months ago
Isn't this improved with Python 3.10?
How so? Why would this change how Sphinx renders classes?
Because NewType
was changed to a class instead of a function with 3.10.
I found this in ESSdiffraction (see link) and I built the docs with 3.10. So it may be the other way around, because NewType is a class, sphinx shows the docs for the underlying class.
The docs that Sphinx renders for domain types are not the most useful. They simply show the docs of the underlying class. This is a bit hard to read. And it can lead to problems with links, see https://github.com/scipp/essdiffraction/pull/43/commits/8a22410fb9086a09b256c125f662b301a4ae6986
I suggest we simply show the underlying type with a link to its docs. This may be easy to do with a custom template. But only if we keep domain types in a common module. Otherwise, it's hard to detect what are domain types and what not.