Skip to content
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

hard to read docs for domain types #143

Open
jl-wynen opened this issue Mar 11, 2024 · 4 comments
Open

hard to read docs for domain types #143

jl-wynen opened this issue Mar 11, 2024 · 4 comments

Comments

@jl-wynen
Copy link
Member

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 scipp/essdiffraction@8a22410

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.

@SimonHeybrock
Copy link
Member

Isn't this improved with Python 3.10?

@jl-wynen
Copy link
Member Author

How so? Why would this change how Sphinx renders classes?

@SimonHeybrock
Copy link
Member

Because NewType was changed to a class instead of a function with 3.10.

@jl-wynen
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants