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

Sphinx option rst_prolog and rst_epilog break return type injection #444

Closed
caffeinepills opened this issue Apr 9, 2024 · 0 comments · Fixed by #445
Closed

Sphinx option rst_prolog and rst_epilog break return type injection #444

caffeinepills opened this issue Apr 9, 2024 · 0 comments · Fixed by #445

Comments

@caffeinepills
Copy link
Contributor

When adding any of those sphinx options: rst_epilog or rst_prolog

It will break the return type injection. For example we have one for the minimum python version (min_python_version).

When using the rst_epilog all of the return types become the version:
image

If you use the rst_prolog the return types are working again, but now the return type always appear at the top of the class, before the header and parameters.

image

Disabling either will produce the correct result:
image

Due to the rst, it creates a bunch of nodes either before or after: <substitution_definition names="min_python_version">3.8</substitution_definition> which mess with the line parsing. Since it's assuming certain things come after paramters, it doesn't pick the correct lines.

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

Successfully merging a pull request may close this issue.

1 participant