10000 Make the Sphinx build error on warnings and fix all warnings by asmeurer · Pull Request #390 · data-apis/array-api · GitHub
[go: up one dir, main page]

Skip to content

Make the Sphinx build error on warnings and fix all warnings #390

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

Merged
merged 4 commits into from
Feb 8, 2022

Conversation

asmeurer
Copy link
Member
@asmeurer asmeurer commented Feb 8, 2022

Some warnings were legitimate cross-reference issues, and some are from autodoc wanting to create cross-references for every type hint. These have to be ignored using the nitpick_ignore variable in conf.py, since we don't actually have anything to reference for the given type hints.

This will make Sphinx warn when there are cross-references that it cannot find
Without it, it just silently makes the text not link to anything.
There are several warnings that need to be fixed, but they are all legitimate
errors in the markup that should be fixed.
A lot of errors come from autodoc wanting to make cross references for every
return type hint. This is disabled manually using the nitpick_ignore variable
in conf.py for each instance.
Copy link
Contributor
@kgryte kgryte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks, @asmeurer!

@kgryte kgryte merged commit 6721451 into data-apis:main Feb 8, 2022
@asmeurer
Copy link
Member Author
asmeurer commented Feb 8, 2022

By the way, ideally we would have from __future__ import annotations in all the files, but if you do this it triggers a bug in Sphinx, which is fixed by this unmerged PR sphinx-doc/sphinx#9736. I need to double check but I think there is no difference in the rendering from doing this, so we can hold off on doing it for now.

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 this pull request may close these issues.

2 participants
0