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

Type annotations cause Sphinx warnings #14

Open
aleuffre opened this issue May 28, 2023 · 0 comments
Open

Type annotations cause Sphinx warnings #14

aleuffre opened this issue May 28, 2023 · 0 comments

Comments

@aleuffre
Copy link

aleuffre commented May 28, 2023

Type annotations cause the following warning:

[...]/src/sphinxy/sphinx.py:docstring of sphinxy.sphinx.Sphinx.update_riddle:1: WARNING: more than one target found for cross-reference 'Riddle': sphinxy.Riddle, sphinxy.riddle.Riddle

Apparently this is a several-years-old issue

sphinx-doc/sphinx#4961

that just became more common as type annotations in python started being used more and more:

sphinx-doc/sphinx#4961 (comment)

(Temporary?) solution I found: sphinx-doc/sphinx#4961 (comment)

Adding this line in conf.py

autodoc_default_options = {
    'ignore-module-all': True
}

Unsure about any possible side effects, but worked for me.

Thank you for the workshop! It was very useful and both of you were very helpful and very clear 💜

nstarman added a commit to nstarman/astropy that referenced this issue Jan 11, 2024
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