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

0.971: sphinx warnings reference target not found #13196

Closed
kloczek opened this issue Jul 20, 2022 · 2 comments · Fixed by #15875
Closed

0.971: sphinx warnings reference target not found #13196

kloczek opened this issue Jul 20, 2022 · 2 comments · Fixed by #15875

Comments

@kloczek
Copy link

kloczek commented Jul 20, 2022

On building my packages I'm using sphinx-build command with -n switch which shows warmings about missing references. These are not critical issues.
Here is the output with warnings:

+ /usr/bin/sphinx-build -n -T -b man docs/source build/sphinx/man
Running Sphinx v5.0.2
making output directory... done
loading intersphinx inventory from https://docs.python.org/3/objects.inv...
loading intersphinx inventory from https://six.readthedocs.io/objects.inv...
loading intersphinx inventory from http://www.attrs.org/en/stable/objects.inv...
loading intersphinx inventory from http://docs.cython.org/en/latest/objects.inv...
loading intersphinx inventory from https://monkeytype.readthedocs.io/en/latest/objects.inv...
loading intersphinx inventory from https://setuptools.readthedocs.io/en/latest/objects.inv...
intersphinx inventory has moved: http://www.attrs.org/en/stable/objects.inv -> https://www.attrs.org/en/stable/objects.inv
intersphinx inventory has moved: https://setuptools.readthedocs.io/en/latest/objects.inv -> https://setuptools.pypa.io/en/latest/objects.inv
building [mo]: targets for 0 po files that are out of date
building [man]: all manpages
updating environment: [new config] 37 added, 0 changed, 0 removed
reading sources... [100%] type_narrowing
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
writing... python-mypy.3 { getting_started existing_code cheat_sheet_py3 cheat_sheet builtin_types type_inference_and_annotations kinds_of_types class_basics runtime_troubles protocols dynamic_typing python2 type_narrowing duck_type_compatibility stubs generics more_types literal_types final_attrs metaclasses running_mypy command_line config_file inline_config mypy_daemon installed_packages extending_mypy stubgen stubtest common_issues supported_python_features error_codes error_code_list error_code_list2 additional_features faq } /home/tkloczko/rpmbuild/BUILD/mypy-0.971/docs/source/class_basics.rst:218: WARNING: unknown document: library/abc
/home/tkloczko/rpmbuild/BUILD/mypy-0.971/docs/source/runtime_troubles.rst:66: WARNING: py:func reference target not found: typing.NewType
/home/tkloczko/rpmbuild/BUILD/mypy-0.971/docs/source/runtime_troubles.rst:240: WARNING: py:meth reference target not found: __class_getitem__
/home/tkloczko/rpmbuild/BUILD/mypy-0.971/docs/source/type_narrowing.rst:19: WARNING: py:func reference target not found: type
/home/tkloczko/rpmbuild/BUILD/mypy-0.971/docs/source/more_types.rst:4: WARNING: py:func reference target not found: typing.NewType
/home/tkloczko/rpmbuild/BUILD/mypy-0.971/docs/source/more_types.rst:14: WARNING: py:func reference target not found: typing.NewType
/home/tkloczko/rpmbuild/BUILD/mypy-0.971/docs/source/more_types.rst:86: WARNING: py:func reference target not found: typing.NewType
/home/tkloczko/rpmbuild/BUILD/mypy-0.971/docs/source/more_types.rst:125: WARNING: py:func reference target not found: typing.NewType
/home/tkloczko/rpmbuild/BUILD/mypy-0.971/docs/source/more_types.rst:130: WARNING: py:func reference target not found: typing.NewType
/home/tkloczko/rpmbuild/BUILD/mypy-0.971/docs/source/more_types.rst:150: WARNING: py:func reference target not found: typing.NewType
/home/tkloczko/rpmbuild/BUILD/mypy-0.971/docs/source/more_types.rst:150: WARNING: py:func reference target not found: typing.NewType
/home/tkloczko/rpmbuild/BUILD/mypy-0.971/docs/source/more_types.rst:155: WARNING: py:func reference target not found: typing.NewType
/home/tkloczko/rpmbuild/BUILD/mypy-0.971/docs/source/more_types.rst:155: WARNING: py:func reference target not found: typing.NewType
/home/tkloczko/rpmbuild/BUILD/mypy-0.971/docs/source/more_types.rst:172: WARNING: py:func reference target not found: typing.NewType
/home/tkloczko/rpmbuild/BUILD/mypy-0.971/docs/source/literal_types.rst:409: WARNING: py:class reference target not found: enum.StrEnum
/home/tkloczko/rpmbuild/BUILD/mypy-0.971/docs/source/error_code_list.rst:570: WARNING: py:func reference target not found: typing.NewType
/home/tkloczko/rpmbuild/BUILD/mypy-0.971/docs/source/additional_features.rst:142: WARNING: py:class reference target not found: attr.Factory
done
build succeeded, 17 warnings.

You can peak on fixes that kind of issues in other projects
latchset/jwcrypto#289
click-contrib/sphinx-click@abc31069
latchset/jwcrypto#289
RDFLib/rdflib-sqlalchemy#95
sissaschool/elementpath@bf869d9e
jaraco/cssutils#21
pywbem/pywbem#2895
sissaschool/xmlschema@42ea98f2
RDFLib/rdflib#2036
frostming/unearth#14

@kloczek kloczek added the bug mypy got something wrong label Jul 20, 2022
@ethanhs ethanhs added documentation and removed bug mypy got something wrong labels Jul 20, 2022
@ethanhs
Copy link
Collaborator

ethanhs commented Jul 20, 2022

I would be happy to review a PR to make mypy's docs build pass with -n but I don't think we build with it by default.

@kloczek
Copy link
Author

kloczek commented Jul 20, 2022

Without fixed those warning sphinx cannot add on documentation symbols links and instead higlits those prases.

JelleZijlstra pushed a commit that referenced this issue Aug 15, 2023
Fixes #13196.

Enable the nit-picky mode on sphinx-build in tox, as this will
facilitate the detection of potential issues related to missing
references.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants