sphinx-codeautolink 0.17.2__tar.gz → 0.17.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sphinx_codeautolink-0.17.2/src/sphinx_codeautolink.egg-info → sphinx_codeautolink-0.17.4}/PKG-INFO +1 -1
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/contributing.rst +10 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/docs/src/about.rst +2 -2
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/docs/src/index.rst +1 -1
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/docs/src/release_notes.rst +9 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/pyproject.toml +3 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/src/sphinx_codeautolink/__init__.py +1 -1
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/src/sphinx_codeautolink/extension/__init__.py +17 -4
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/src/sphinx_codeautolink/extension/backref.py +6 -1
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/src/sphinx_codeautolink/extension/block.py +6 -1
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4/src/sphinx_codeautolink.egg-info}/PKG-INFO +1 -1
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/__init__.py +111 -2
- sphinx_codeautolink-0.17.4/tests/extension/_check.py +68 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tox.ini +3 -3
- sphinx_codeautolink-0.17.2/tests/extension/_check.py +0 -41
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/LICENSE +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/MANIFEST.in +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/docs/requirements.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/docs/src/404.rst +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/docs/src/conf.py +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/docs/src/example_library.rst +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/docs/src/examples.rst +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/docs/src/lib.py +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/docs/src/reference.rst +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/docs/src/static/custom.css +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/readme_pypi.rst +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/requirements/build +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/requirements/dev +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/requirements/docs +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/requirements/extras +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/requirements/tests +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/setup.cfg +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/src/sphinx_codeautolink/extension/cache.py +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/src/sphinx_codeautolink/extension/directive.py +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/src/sphinx_codeautolink/extension/resolve.py +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/src/sphinx_codeautolink/extension/translation.py +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/src/sphinx_codeautolink/locale/de/LC_MESSAGES/sphinx-codeautolink.mo +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/src/sphinx_codeautolink/locale/de/LC_MESSAGES/sphinx-codeautolink.po +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/src/sphinx_codeautolink/locale/es/LC_MESSAGES/sphinx-codeautolink.mo +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/src/sphinx_codeautolink/locale/es/LC_MESSAGES/sphinx-codeautolink.po +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/src/sphinx_codeautolink/locale/fi/LC_MESSAGES/sphinx-codeautolink.mo +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/src/sphinx_codeautolink/locale/fi/LC_MESSAGES/sphinx-codeautolink.po +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/src/sphinx_codeautolink/locale/fr/LC_MESSAGES/sphinx-codeautolink.mo +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/src/sphinx_codeautolink/locale/fr/LC_MESSAGES/sphinx-codeautolink.po +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/src/sphinx_codeautolink/locale/it/LC_MESSAGES/sphinx-codeautolink.mo +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/src/sphinx_codeautolink/locale/it/LC_MESSAGES/sphinx-codeautolink.po +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/src/sphinx_codeautolink/locale/nl/LC_MESSAGES/sphinx-codeautolink.mo +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/src/sphinx_codeautolink/locale/nl/LC_MESSAGES/sphinx-codeautolink.po +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/src/sphinx_codeautolink/locale/ru/LC_MESSAGES/sphinx-codeautolink.po +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/src/sphinx_codeautolink/locale/sphinx-codeautolink.pot +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/src/sphinx_codeautolink/locale/uk/LC_MESSAGES/sphinx-codeautolink.po +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/src/sphinx_codeautolink/parse.py +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/src/sphinx_codeautolink/static/sphinx-codeautolink.css +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/src/sphinx_codeautolink/warn.py +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/src/sphinx_codeautolink.egg-info/SOURCES.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/src/sphinx_codeautolink.egg-info/dependency_links.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/src/sphinx_codeautolink.egg-info/requires.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/src/sphinx_codeautolink.egg-info/top_level.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/__init__.py +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/fail/concat_invalid.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/fail/custom_block_import_invalid.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/fail/custom_block_syntax_error.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/fail/failed_resolve_invalid_location.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/fail/failed_resolve_no_module.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/fail/failed_resolve_return_type.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/fail/match_block_warning.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/fail/missing_inventory.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/fail/no_backreference.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/fail/no_module_docs.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/fail/preface_invalid_arg.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/fail/ref_import_star_invalid.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/fail/ref_invalid_block_type.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/fail/ref_invalid_syntax.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/fail/ref_invalid_syntax_complex.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/fail/ref_ipython_non-python.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/fail/skip_invalid.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/class_mro_fix.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/concat_default.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/concat_off.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/concat_on_across_sections.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/concat_on_breaks.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/concat_section_breaks.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/concat_section_returns_to_global.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/custom_block.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/custom_block_imported.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/empty_project.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/inventory_map_is_needed.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/inventory_map_not_needed.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_bazel.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_default.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_default_fail.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_doctest.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_doctest_empty_input.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_extdoctest_doctest.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_extdoctest_setup.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_extdoctest_setup_wrong.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_extdoctest_testcode.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_highlight_language.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_highlight_none.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_ipython.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_ipython3.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_ipython_directive.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_ipython_directive_comment.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_ipython_syntax.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_literal.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_non_python_block.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_py.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_py3.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_pycon.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_pycon_implicit.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_pyi.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_python3.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_sage.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_starlark.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/line_numbers.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/preface_concatenated.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/preface_consumed_non_python.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/preface_document.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/preface_global.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/preface_global_multiline.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/preface_global_overwritten.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/preface_multiline.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/preface_multiline_and_arg.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/preface_multiple.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/preface_single.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_assign_targets.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_builtins.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_chain.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_chain_call.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_class_attr.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_class_meth_returns_self.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_class_type_attr.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_decorator.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_fluent_attrs.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_fluent_call.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_func_args.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_func_no_module.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_import_as.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_import_from.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_import_from_complex.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_import_multiple.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_import_multiple_libs.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_import_star.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_import_submodule.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_imported_func.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_imported_func_relocated.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_inherited.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_intersphinx_only.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_invalid_func.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_invalid_typehint.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_optional.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_optional_future.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_shadow_builtin.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_simple.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/search_css_duplicates_removed.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/skip_file.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/skip_next.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/skip_next_consumed_non_python.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/skip_off.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/skip_section.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/src/class_mro_fix.py +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/src/future_project.py +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/src/parser_func.py +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/src/test_project/__init__.py +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/src/test_project/sub.py +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/table/tab_autodoc_empty.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/table/tab_autodoc_links.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/table/tab_manual_collapse.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/table/tab_manual_empty.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/table/tab_manual_links.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/table/tab_manual_links_subsection.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/table/tab_no_table.txt +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/parse/__init__.py +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/parse/_util.py +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/parse/assign.py +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/parse/chain.py +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/parse/match.py +0 -0
- {sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/parse/scope.py +0 -0
{sphinx_codeautolink-0.17.2/src/sphinx_codeautolink.egg-info → sphinx_codeautolink-0.17.4}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: sphinx-codeautolink
|
|
3
|
-
Version: 0.17.
|
|
3
|
+
Version: 0.17.4
|
|
4
4
|
Summary: Automatic links from code examples to reference documentation.
|
|
5
5
|
Author-email: Felix Hildén <felix.hilden@gmail.com>
|
|
6
6
|
Maintainer-email: Felix Hildén <felix.hilden@gmail.com>
|
|
@@ -37,6 +37,16 @@ For tips and tricks on contributing, see `how to submit a contribution
|
|
|
37
37
|
specifically `opening a pull request
|
|
38
38
|
<https://opensource.guide/how-to-contribute/#opening-a-pull-request>`_.
|
|
39
39
|
|
|
40
|
+
If you want to contribute to someone else's fork and find yourself forgetting
|
|
41
|
+
how to do it every time, here's the runbook:
|
|
42
|
+
|
|
43
|
+
.. code:: sh
|
|
44
|
+
|
|
45
|
+
git remote add [name] git@github.com:[name]/sphinx-codeautolink.git
|
|
46
|
+
git fetch [name]
|
|
47
|
+
git switch -c branch [name]/branch
|
|
48
|
+
git remote rm [name]
|
|
49
|
+
|
|
40
50
|
Testing
|
|
41
51
|
-------
|
|
42
52
|
The installation can be verified, and any changes tested by running tox.
|
|
@@ -16,8 +16,8 @@ is injected after the ordinary Sphinx build is finished.
|
|
|
16
16
|
|
|
17
17
|
Caveats
|
|
18
18
|
-------
|
|
19
|
-
- **Only works with HTML documentation**, disabled otherwise. If the
|
|
20
|
-
is off, it silently removes directives that would produce output.
|
|
19
|
+
- **Only works with HTML or DIRHTML documentation**, disabled otherwise. If the
|
|
20
|
+
extension is off, it silently removes directives that would produce output.
|
|
21
21
|
- **Only processes blocks, not inline code**. Sphinx has great tools
|
|
22
22
|
for linking definitions inline, and longer code should be in a block anyway.
|
|
23
23
|
- **Doesn't run example code**. Therefore all possible resolvable types are not
|
|
@@ -68,7 +68,7 @@ Caveats
|
|
|
68
68
|
-------
|
|
69
69
|
For a more thorough explanation, see :ref:`about`.
|
|
70
70
|
|
|
71
|
-
- Only works with HTML documentation
|
|
71
|
+
- Only works with HTML or DIRHTML documentation
|
|
72
72
|
- Only processes blocks, not inline code
|
|
73
73
|
- Doesn't run example code
|
|
74
74
|
- Parsing and type hint resolving is incomplete
|
|
@@ -8,6 +8,15 @@ These release notes are based on
|
|
|
8
8
|
sphinx-codeautolink adheres to
|
|
9
9
|
`Semantic Versioning <https://semver.org>`_.
|
|
10
10
|
|
|
11
|
+
0.17.4 (2025-03-07)
|
|
12
|
+
-------------------
|
|
13
|
+
- Fix backreference links using relative URIs (:issue:`190`)
|
|
14
|
+
|
|
15
|
+
0.17.3 (2025-03-06)
|
|
16
|
+
-------------------
|
|
17
|
+
- Fix Sphinx InventoryItem deprecation warning (:issue:`173`)
|
|
18
|
+
- Add support for the DIRHTML Sphinx builder (:issue:`188`)
|
|
19
|
+
|
|
11
20
|
0.17.2 (2025-03-02)
|
|
12
21
|
-------------------
|
|
13
22
|
- Support :rst:dir:`testsetup` from ``sphinx.ext.doctest`` as another
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/src/sphinx_codeautolink/__init__.py
RENAMED
|
@@ -8,7 +8,7 @@ from .extension import SphinxCodeAutoLink, backref, directive
|
|
|
8
8
|
from .extension.block import clean_ipython, clean_pycon
|
|
9
9
|
from .extension.translation import MESSAGE_CATALOG_NAME
|
|
10
10
|
|
|
11
|
-
__version__ = "0.17.
|
|
11
|
+
__version__ = "0.17.4"
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
def setup(app: Sphinx):
|
|
@@ -7,6 +7,7 @@ from functools import wraps
|
|
|
7
7
|
from pathlib import Path
|
|
8
8
|
from traceback import print_exc
|
|
9
9
|
|
|
10
|
+
from sphinx import version_info as sphinx_version
|
|
10
11
|
from sphinx.ext.intersphinx import InventoryAdapter
|
|
11
12
|
from sphinx.util import import_object
|
|
12
13
|
|
|
@@ -89,7 +90,7 @@ class SphinxCodeAutoLink:
|
|
|
89
90
|
@print_exceptions()
|
|
90
91
|
def build_inited(self, app) -> None:
|
|
91
92
|
"""Handle initial setup."""
|
|
92
|
-
if app.builder.name
|
|
93
|
+
if app.builder.name not in ("html", "dirhtml"):
|
|
93
94
|
self.do_nothing = True
|
|
94
95
|
return
|
|
95
96
|
|
|
@@ -177,7 +178,9 @@ class SphinxCodeAutoLink:
|
|
|
177
178
|
}
|
|
178
179
|
inter_inv = InventoryAdapter(app.env).main_inventory
|
|
179
180
|
transposed = transpose_inventory(inter_inv, relative_to=app.outdir)
|
|
180
|
-
transposed.update(
|
|
181
|
+
transposed.update(
|
|
182
|
+
transpose_inventory(inventory, relative_to=app.outdir, use_tuple=True)
|
|
183
|
+
)
|
|
181
184
|
return transposed
|
|
182
185
|
|
|
183
186
|
@print_exceptions()
|
|
@@ -268,6 +271,8 @@ class SphinxCodeAutoLink:
|
|
|
268
271
|
visitor = CodeRefsVisitor(
|
|
269
272
|
doctree,
|
|
270
273
|
code_refs=self.code_refs,
|
|
274
|
+
docname=docname,
|
|
275
|
+
builder=app.builder,
|
|
271
276
|
warn_no_backreference=self.warn_no_backreference,
|
|
272
277
|
)
|
|
273
278
|
doctree.walk(visitor)
|
|
@@ -289,12 +294,15 @@ class SphinxCodeAutoLink:
|
|
|
289
294
|
self.inventory,
|
|
290
295
|
self.custom_blocks,
|
|
291
296
|
self.search_css_classes,
|
|
297
|
+
builder_name=app.builder.name,
|
|
292
298
|
)
|
|
293
299
|
|
|
294
300
|
self.cache.write()
|
|
295
301
|
|
|
296
302
|
|
|
297
|
-
def transpose_inventory(
|
|
303
|
+
def transpose_inventory(
|
|
304
|
+
inv: dict, relative_to: str, *, use_tuple: bool = False
|
|
305
|
+
) -> dict[str, str]:
|
|
298
306
|
"""
|
|
299
307
|
Transpose Sphinx inventory from {type: {name: (..., location)}} to {name: location}.
|
|
300
308
|
|
|
@@ -306,13 +314,18 @@ def transpose_inventory(inv: dict, relative_to: str) -> dict[str, str]:
|
|
|
306
314
|
Sphinx inventory
|
|
307
315
|
relative_to
|
|
308
316
|
if a local file is found, transform it to be relative to this dir
|
|
317
|
+
use_tuple
|
|
318
|
+
force using Sphinx inventory tuple interface,
|
|
319
|
+
TODO: move to class interface if it becomes public (#173)
|
|
309
320
|
"""
|
|
310
321
|
transposed = {}
|
|
311
322
|
for type_, items in inv.items():
|
|
312
323
|
if not type_.startswith("py:"):
|
|
313
324
|
continue
|
|
314
325
|
for item, info in items.items():
|
|
315
|
-
location =
|
|
326
|
+
location = (
|
|
327
|
+
info.uri if not use_tuple and sphinx_version >= (8, 2) else info[2]
|
|
328
|
+
)
|
|
316
329
|
if not location.startswith("http"):
|
|
317
330
|
location = str(Path(location).relative_to(relative_to))
|
|
318
331
|
transposed[item] = location
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
from dataclasses import dataclass
|
|
4
4
|
|
|
5
5
|
from docutils import nodes
|
|
6
|
+
from sphinx.builders import Builder
|
|
6
7
|
|
|
7
8
|
from sphinx_codeautolink.warn import logger, warn_type
|
|
8
9
|
|
|
@@ -62,11 +63,15 @@ class CodeRefsVisitor(nodes.SparseNodeVisitor):
|
|
|
62
63
|
self,
|
|
63
64
|
*args,
|
|
64
65
|
code_refs: dict[str, list[CodeExample]],
|
|
66
|
+
docname: str,
|
|
67
|
+
builder: Builder,
|
|
65
68
|
warn_no_backreference: bool = False,
|
|
66
69
|
**kwargs,
|
|
67
70
|
) -> None:
|
|
68
71
|
super().__init__(*args, **kwargs)
|
|
69
72
|
self.code_refs = code_refs
|
|
73
|
+
self.docname = docname
|
|
74
|
+
self.builder = builder
|
|
70
75
|
self.warn_no_backreference = warn_no_backreference
|
|
71
76
|
|
|
72
77
|
def unknown_departure(self, node) -> None:
|
|
@@ -79,7 +84,7 @@ class CodeRefsVisitor(nodes.SparseNodeVisitor):
|
|
|
79
84
|
|
|
80
85
|
items = []
|
|
81
86
|
for ref in self.code_refs.get(node.ref, []):
|
|
82
|
-
link = ref.document
|
|
87
|
+
link = self.builder.get_relative_uri(self.docname, ref.document)
|
|
83
88
|
if ref.ref_id is not None:
|
|
84
89
|
link += f"#{ref.ref_id}"
|
|
85
90
|
items.append((link, " / ".join(ref.headings)))
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/src/sphinx_codeautolink/extension/block.py
RENAMED
|
@@ -375,9 +375,14 @@ def link_html(
|
|
|
375
375
|
inventory: dict,
|
|
376
376
|
custom_blocks: dict,
|
|
377
377
|
search_css_classes: list,
|
|
378
|
+
builder_name: str = "html",
|
|
378
379
|
) -> None:
|
|
379
380
|
"""Inject links to code blocks on disk."""
|
|
380
|
-
|
|
381
|
+
if builder_name == "dirhtml" and Path(document).name != "index":
|
|
382
|
+
html_file = Path(out_dir) / document / "index.html"
|
|
383
|
+
else:
|
|
384
|
+
html_file = Path(out_dir) / (document + ".html")
|
|
385
|
+
|
|
381
386
|
text = html_file.read_text("utf-8")
|
|
382
387
|
soup = BeautifulSoup(text, "html.parser")
|
|
383
388
|
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4/src/sphinx_codeautolink.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: sphinx-codeautolink
|
|
3
|
-
Version: 0.17.
|
|
3
|
+
Version: 0.17.4
|
|
4
4
|
Summary: Automatic links from code examples to reference documentation.
|
|
5
5
|
Author-email: Felix Hildén <felix.hilden@gmail.com>
|
|
6
6
|
Maintainer-email: Felix Hildén <felix.hilden@gmail.com>
|
|
@@ -9,7 +9,7 @@ import pytest
|
|
|
9
9
|
from bs4 import BeautifulSoup
|
|
10
10
|
from sphinx.cmd.build import main as sphinx_main
|
|
11
11
|
|
|
12
|
-
from ._check import check_link_targets
|
|
12
|
+
from ._check import check_link_targets, check_reference_targets_exist
|
|
13
13
|
|
|
14
14
|
# Insert test package root to path for all tests
|
|
15
15
|
sys.path.insert(0, str(Path(__file__).parent / "src"))
|
|
@@ -278,6 +278,7 @@ Test project
|
|
|
278
278
|
|
|
279
279
|
for file in subfiles:
|
|
280
280
|
assert_links(result_dir / (file + ".html"), links)
|
|
281
|
+
|
|
281
282
|
assert check_link_targets(result_dir) == n_subfiles * len(links)
|
|
282
283
|
|
|
283
284
|
|
|
@@ -312,6 +313,112 @@ Test project
|
|
|
312
313
|
assert "sphinx-codeautolink-a" in str(blocks[1])
|
|
313
314
|
|
|
314
315
|
|
|
316
|
+
def test_dirhtml_builder(tmp_path: Path):
|
|
317
|
+
index = """
|
|
318
|
+
Test project
|
|
319
|
+
============
|
|
320
|
+
|
|
321
|
+
.. toctree::
|
|
322
|
+
:maxdepth: 2
|
|
323
|
+
|
|
324
|
+
page1/index
|
|
325
|
+
page2
|
|
326
|
+
subdir/page3
|
|
327
|
+
|
|
328
|
+
Index Page Code
|
|
329
|
+
---------------
|
|
330
|
+
|
|
331
|
+
.. code:: python
|
|
332
|
+
|
|
333
|
+
import test_project
|
|
334
|
+
test_project.bar()
|
|
335
|
+
|
|
336
|
+
.. automodule:: test_project
|
|
337
|
+
"""
|
|
338
|
+
|
|
339
|
+
page = """
|
|
340
|
+
Page {idx}
|
|
341
|
+
===========
|
|
342
|
+
|
|
343
|
+
.. code:: python
|
|
344
|
+
|
|
345
|
+
import test_project
|
|
346
|
+
test_project.bar()
|
|
347
|
+
|
|
348
|
+
.. autolink-examples:: test_project.bar
|
|
349
|
+
"""
|
|
350
|
+
|
|
351
|
+
files = {
|
|
352
|
+
"conf.py": default_conf,
|
|
353
|
+
"index.rst": index,
|
|
354
|
+
"page1/index.rst": page.format(idx=1),
|
|
355
|
+
"page2.rst": page.format(idx=2),
|
|
356
|
+
"subdir/page3.rst": page.format(idx=3),
|
|
357
|
+
}
|
|
358
|
+
links = ["test_project", "test_project.bar"]
|
|
359
|
+
|
|
360
|
+
result_dir = _sphinx_build(tmp_path, "dirhtml", files)
|
|
361
|
+
|
|
362
|
+
assert_links(result_dir / "index.html", links)
|
|
363
|
+
assert_links(result_dir / "page1/index.html", links)
|
|
364
|
+
assert_links(result_dir / "page2/index.html", links)
|
|
365
|
+
assert_links(result_dir / "subdir/page3/index.html", links)
|
|
366
|
+
|
|
367
|
+
assert check_link_targets(result_dir) == len(links) * 4
|
|
368
|
+
check_reference_targets_exist(result_dir)
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
def test_html_subdir_reference(tmp_path: Path):
|
|
372
|
+
index = """
|
|
373
|
+
Test project
|
|
374
|
+
============
|
|
375
|
+
|
|
376
|
+
.. toctree::
|
|
377
|
+
|
|
378
|
+
subdir/page1
|
|
379
|
+
subdir/subdir2/page2
|
|
380
|
+
|
|
381
|
+
Index Page
|
|
382
|
+
----------
|
|
383
|
+
|
|
384
|
+
.. code:: python
|
|
385
|
+
|
|
386
|
+
import test_project
|
|
387
|
+
test_project.bar()
|
|
388
|
+
|
|
389
|
+
.. automodule:: test_project
|
|
390
|
+
"""
|
|
391
|
+
|
|
392
|
+
page = """
|
|
393
|
+
Page {idx}
|
|
394
|
+
===========
|
|
395
|
+
|
|
396
|
+
.. code:: python
|
|
397
|
+
|
|
398
|
+
import test_project
|
|
399
|
+
test_project.bar()
|
|
400
|
+
|
|
401
|
+
.. autolink-examples:: test_project.bar
|
|
402
|
+
"""
|
|
403
|
+
|
|
404
|
+
files = {
|
|
405
|
+
"conf.py": default_conf,
|
|
406
|
+
"index.rst": index,
|
|
407
|
+
"subdir/page1.rst": page.format(idx=1),
|
|
408
|
+
"subdir/subdir2/page2.rst": page.format(idx=2),
|
|
409
|
+
}
|
|
410
|
+
links = ["test_project", "test_project.bar"]
|
|
411
|
+
|
|
412
|
+
result_dir = _sphinx_build(tmp_path, "html", files)
|
|
413
|
+
|
|
414
|
+
assert_links(result_dir / "index.html", links)
|
|
415
|
+
assert_links(result_dir / "subdir/page1.html", links)
|
|
416
|
+
assert_links(result_dir / "subdir/subdir2/page2.html", links)
|
|
417
|
+
|
|
418
|
+
assert check_link_targets(result_dir) == len(links) * 3
|
|
419
|
+
check_reference_targets_exist(result_dir)
|
|
420
|
+
|
|
421
|
+
|
|
315
422
|
def _sphinx_build(
|
|
316
423
|
folder: Path, builder: str, files: dict[str, str], n_processes: int | None = None
|
|
317
424
|
) -> Path:
|
|
@@ -319,7 +426,9 @@ def _sphinx_build(
|
|
|
319
426
|
src_dir = folder / "src"
|
|
320
427
|
src_dir.mkdir(exist_ok=True)
|
|
321
428
|
for name, content in files.items():
|
|
322
|
-
|
|
429
|
+
path = src_dir / name
|
|
430
|
+
path.parent.mkdir(exist_ok=True, parents=True)
|
|
431
|
+
path.write_text(content, "utf-8")
|
|
323
432
|
|
|
324
433
|
build_dir = folder / "build"
|
|
325
434
|
args = ["-M", builder, str(src_dir), str(build_dir), "-W"]
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
import requests
|
|
4
|
+
from bs4 import BeautifulSoup
|
|
5
|
+
|
|
6
|
+
# Cache external pages for the duration of the runtime,
|
|
7
|
+
# so that we don't request them multiple times needlessly
|
|
8
|
+
sess = requests.Session()
|
|
9
|
+
external_site_ids = {}
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def check_link_targets(root: Path) -> int:
|
|
13
|
+
"""Validate links in HTML site at root, return number of links found."""
|
|
14
|
+
site_docs = {
|
|
15
|
+
p: BeautifulSoup(p.read_text("utf-8"), "html.parser")
|
|
16
|
+
for p in root.glob("**/*.html")
|
|
17
|
+
}
|
|
18
|
+
site_ids = {k: gather_ids(v) for k, v in site_docs.items()}
|
|
19
|
+
|
|
20
|
+
total = 0
|
|
21
|
+
for doc, soup in site_docs.items():
|
|
22
|
+
for link in soup.find_all("a", attrs={"class": "sphinx-codeautolink-a"}):
|
|
23
|
+
base, id_ = link["href"].split("#")
|
|
24
|
+
if any(base.startswith(s) for s in ("http://", "https://")):
|
|
25
|
+
if base not in external_site_ids:
|
|
26
|
+
sub_soup = BeautifulSoup(sess.get(base).text, "html.parser")
|
|
27
|
+
external_site_ids[base] = gather_ids(sub_soup)
|
|
28
|
+
ids = external_site_ids[base]
|
|
29
|
+
else:
|
|
30
|
+
target_path = (doc.parent / base).resolve()
|
|
31
|
+
if target_path.is_dir():
|
|
32
|
+
target_path /= "index.html"
|
|
33
|
+
assert target_path.exists(), (
|
|
34
|
+
f"Target path {target_path!s} not found while validating"
|
|
35
|
+
f" link for `{link.string}` in {doc.relative_to(root)!s}!"
|
|
36
|
+
)
|
|
37
|
+
ids = site_ids[target_path]
|
|
38
|
+
|
|
39
|
+
assert id_ in ids, (
|
|
40
|
+
f"ID {id_} not found in {base} while validating link"
|
|
41
|
+
f" for `{link.string}` in {doc.relative_to(root)!s}!"
|
|
42
|
+
)
|
|
43
|
+
total += 1
|
|
44
|
+
return total
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def check_reference_targets_exist(root: Path):
|
|
48
|
+
site_docs = {
|
|
49
|
+
p: BeautifulSoup(p.read_text("utf-8"), "html.parser")
|
|
50
|
+
for p in root.glob("**/*.html")
|
|
51
|
+
}
|
|
52
|
+
for doc, soup in site_docs.items():
|
|
53
|
+
for link in soup.find_all("a", attrs={"class": "reference internal"}):
|
|
54
|
+
base = link["href"].split("#")[0]
|
|
55
|
+
if any(base.startswith(s) for s in ("http://", "https://")):
|
|
56
|
+
continue
|
|
57
|
+
target_path = doc if base == "" else (doc.parent / base).resolve()
|
|
58
|
+
if target_path.is_dir():
|
|
59
|
+
target_path /= "index.html"
|
|
60
|
+
assert target_path.exists(), (
|
|
61
|
+
f"Target path {target_path!s} not found while validating"
|
|
62
|
+
f" link for `{link.string}` in {doc.relative_to(root)!s}!"
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def gather_ids(soup: BeautifulSoup) -> set:
|
|
67
|
+
"""Gather all HTML IDs from a given page."""
|
|
68
|
+
return {tag["id"] for tag in soup.find_all(id=True)}
|
|
@@ -35,7 +35,7 @@ commands = coverage run
|
|
|
35
35
|
[testenv:doc8]
|
|
36
36
|
description = Check documentation .rst files
|
|
37
37
|
allowlist_externals = doc8
|
|
38
|
-
commands = doc8 docs/src
|
|
38
|
+
commands = doc8 docs/src --quiet
|
|
39
39
|
|
|
40
40
|
[testenv:docs]
|
|
41
41
|
description = Build Sphinx documentation
|
|
@@ -62,7 +62,7 @@ description = Build and check package
|
|
|
62
62
|
deps = -r requirements/build
|
|
63
63
|
allowlist_externals = rm, cmd
|
|
64
64
|
commands =
|
|
65
|
-
python -m build
|
|
65
|
+
python -m build -C--quiet
|
|
66
66
|
twine check --strict dist/*
|
|
67
67
|
commands_post =
|
|
68
68
|
lin,mac: rm -r dist
|
|
@@ -76,7 +76,7 @@ commands_pre =
|
|
|
76
76
|
lin,mac: rm -rf dist
|
|
77
77
|
win: cmd /c if exist dist rmdir /s /q dist
|
|
78
78
|
commands =
|
|
79
|
-
python -m build
|
|
79
|
+
python -m build -C--quiet
|
|
80
80
|
twine check --strict dist/*
|
|
81
81
|
twine upload dist/* --config-file .pypirc
|
|
82
82
|
commands_post =
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
from pathlib import Path
|
|
2
|
-
|
|
3
|
-
import requests
|
|
4
|
-
from bs4 import BeautifulSoup
|
|
5
|
-
|
|
6
|
-
# Cache external pages for the duration of the runtime,
|
|
7
|
-
# so that we don't request them multiple times needlessly
|
|
8
|
-
sess = requests.Session()
|
|
9
|
-
external_site_ids = {}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
def check_link_targets(root: Path) -> int:
|
|
13
|
-
"""Validate links in HTML site at root, return number of links found."""
|
|
14
|
-
site_docs = {
|
|
15
|
-
p.relative_to(root): BeautifulSoup(p.read_text("utf-8"), "html.parser")
|
|
16
|
-
for p in root.glob("**/*.html")
|
|
17
|
-
}
|
|
18
|
-
site_ids = {k: gather_ids(v) for k, v in site_docs.items()}
|
|
19
|
-
|
|
20
|
-
total = 0
|
|
21
|
-
for doc, soup in site_docs.items():
|
|
22
|
-
for link in soup.find_all("a", attrs={"class": "sphinx-codeautolink-a"}):
|
|
23
|
-
base, id_ = link["href"].split("#")
|
|
24
|
-
if any(base.startswith(s) for s in ("http://", "https://")):
|
|
25
|
-
if base not in external_site_ids:
|
|
26
|
-
sub_soup = BeautifulSoup(sess.get(base).text, "html.parser")
|
|
27
|
-
external_site_ids[base] = gather_ids(sub_soup)
|
|
28
|
-
ids = external_site_ids[base]
|
|
29
|
-
else:
|
|
30
|
-
ids = site_ids[Path(base)]
|
|
31
|
-
assert id_ in ids, (
|
|
32
|
-
f"ID {id_} not found in {base}"
|
|
33
|
-
f" while validating link for `{link.string}` in {doc!s}!"
|
|
34
|
-
)
|
|
35
|
-
total += 1
|
|
36
|
-
return total
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
def gather_ids(soup: BeautifulSoup) -> set:
|
|
40
|
-
"""Gather all HTML IDs from a given page."""
|
|
41
|
-
return {tag["id"] for tag in soup.find_all(id=True)}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/src/sphinx_codeautolink/extension/cache.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/fail/concat_invalid.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/fail/missing_inventory.txt
RENAMED
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/fail/no_backreference.txt
RENAMED
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/fail/no_module_docs.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/fail/skip_invalid.txt
RENAMED
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/class_mro_fix.txt
RENAMED
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/concat_default.txt
RENAMED
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/concat_off.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/concat_on_breaks.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/custom_block.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/empty_project.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_bazel.txt
RENAMED
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_default.txt
RENAMED
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_default_fail.txt
RENAMED
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_doctest.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_ipython.txt
RENAMED
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_ipython3.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_literal.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_pycon.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_python3.txt
RENAMED
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_sage.txt
RENAMED
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/lexer_starlark.txt
RENAMED
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/line_numbers.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/preface_document.txt
RENAMED
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/preface_global.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/preface_multiline.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/preface_multiple.txt
RENAMED
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/preface_single.txt
RENAMED
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_assign_targets.txt
RENAMED
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_builtins.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_chain_call.txt
RENAMED
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_class_attr.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_decorator.txt
RENAMED
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_fluent_attrs.txt
RENAMED
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_fluent_call.txt
RENAMED
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_func_args.txt
RENAMED
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_func_no_module.txt
RENAMED
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_import_as.txt
RENAMED
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_import_from.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_import_star.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_imported_func.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_inherited.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_invalid_func.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_optional.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_shadow_builtin.txt
RENAMED
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/ref_simple.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/ref/skip_section.txt
RENAMED
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/src/class_mro_fix.py
RENAMED
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/src/future_project.py
RENAMED
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/src/parser_func.py
RENAMED
|
File without changes
|
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/src/test_project/sub.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/table/tab_manual_empty.txt
RENAMED
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/table/tab_manual_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sphinx_codeautolink-0.17.2 → sphinx_codeautolink-0.17.4}/tests/extension/table/tab_no_table.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|