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

_parser.parse() causes issues if directives with side-effects are active #510

Open
marten-de-vries opened this issue Dec 16, 2024 · 0 comments

Comments

@marten-de-vries
Copy link

marten-de-vries commented Dec 16, 2024

sphinx-autodoc-typehints will cause a docstring to be processed twice: once by its own _parser module, and once by sphinx.ext.autodoc. This is a problem when directives that have (non-idempotent) side-effects are used.

I ran into this while combining this extension with Sphinx-Needs. The side-effect in that case is that Sphinx-Needs extracts an identifier from the directive block, and verifies the identifier is unique across the project. That's not the case if the identifier is processed twice. As this bug is caused by an interaction of extensions I've opened an issue in the Sphinx-Needs repo as well.

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

1 participant