sphinx-codeautolink 0.15.0__tar.gz → 0.15.2__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.15.0/src/sphinx_codeautolink.egg-info → sphinx_codeautolink-0.15.2}/PKG-INFO +5 -2
- sphinx_codeautolink-0.15.2/docs/requirements.txt +6 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/docs/src/404.rst +2 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/docs/src/about.rst +8 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/docs/src/conf.py +2 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/docs/src/release_notes.rst +9 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/src/sphinx_codeautolink/__init__.py +2 -1
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/src/sphinx_codeautolink/extension/__init__.py +1 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/src/sphinx_codeautolink/extension/backref.py +1 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/src/sphinx_codeautolink/extension/block.py +13 -3
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/src/sphinx_codeautolink/extension/cache.py +1 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/src/sphinx_codeautolink/extension/directive.py +1 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/src/sphinx_codeautolink/extension/resolve.py +2 -1
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/src/sphinx_codeautolink/parse.py +1 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/src/sphinx_codeautolink/warn.py +1 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2/src/sphinx_codeautolink.egg-info}/PKG-INFO +5 -2
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/src/sphinx_codeautolink.egg-info/SOURCES.txt +2 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/__init__.py +4 -3
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/custom_block.txt +1 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/custom_block_imported.txt +1 -0
- sphinx_codeautolink-0.15.2/tests/extension/ref/line_numbers.txt +14 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_extdoctest_doctest.txt +1 -0
- sphinx_codeautolink-0.15.2/tests/extension/ref/ref_import_multiple_libs.txt +17 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/src/test_project/__init__.py +1 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tox.ini +2 -2
- sphinx-codeautolink-0.15.0/docs/requirements.txt +0 -6
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/LICENSE +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/MANIFEST.in +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/contributing.rst +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/docs/src/example_library.rst +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/docs/src/examples.rst +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/docs/src/index.rst +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/docs/src/lib.py +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/docs/src/reference.rst +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/pyproject.toml +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/readme_pypi.rst +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/requirements/build +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/requirements/dev +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/requirements/docs +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/requirements/extras +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/requirements/tests +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/setup.cfg +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/src/sphinx_codeautolink/static/sphinx-codeautolink.css +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/src/sphinx_codeautolink.egg-info/dependency_links.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/src/sphinx_codeautolink.egg-info/requires.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/src/sphinx_codeautolink.egg-info/top_level.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/__init__.py +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/_check.py +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/fail/concat_invalid.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/fail/custom_block_import_invalid.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/fail/custom_block_syntax_error.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/fail/failed_resolve_invalid_location.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/fail/failed_resolve_no_module.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/fail/failed_resolve_return_type.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/fail/match_block_warning.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/fail/missing_inventory.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/fail/no_module_docs.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/fail/ref_import_star_invalid.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/fail/ref_invalid_block_type.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/fail/ref_invalid_syntax.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/fail/ref_invalid_syntax_complex.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/fail/ref_ipython_non-python.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/fail/skip_invalid.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/concat_default.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/concat_off.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/concat_on_across_sections.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/concat_on_breaks.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/concat_section_breaks.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/concat_section_returns_to_global.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/empty_project.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/inventory_map_is_needed.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/inventory_map_not_needed.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/non_python_block.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/preface_concatenated.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/preface_consumed_non_python.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/preface_global.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/preface_global_multiline.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/preface_global_overwritten.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/preface_multiline.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/preface_multiline_and_arg.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/preface_multiple.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/preface_single.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_assign_targets.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_builtins.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_chain.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_chain_call.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_class_attr.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_class_meth_returns_self.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_class_type_attr.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_decorator.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_doctest.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_extdoctest_testcode.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_fluent_attrs.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_fluent_call.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_func_no_module.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_import_as.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_import_from.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_import_from_complex.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_import_multiple.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_import_star.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_import_submodule.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_imported_func.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_imported_func_relocated.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_inherited.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_intersphinx_only.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_ipython.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_ipython3.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_ipython_directive.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_ipython_directive_comment.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_ipython_syntax.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_optional.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_optional_manual.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_py.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_pycon.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_shadow_builtin.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_simple.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/search_css_duplicates_removed.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/skip_file.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/skip_next.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/skip_next_consumed_non_python.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/skip_off.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/skip_section.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/src/parser_func.py +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/src/test_project/sub.py +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/table/tab_autodoc_empty.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/table/tab_autodoc_links.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/table/tab_manual_collapse.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/table/tab_manual_empty.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/table/tab_manual_links.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/table/tab_manual_links_subsection.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/table/tab_no_table.txt +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/parse/__init__.py +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/parse/_util.py +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/parse/assign.py +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/parse/chain.py +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/parse/match.py +0 -0
- {sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/parse/scope.py +0 -0
{sphinx-codeautolink-0.15.0/src/sphinx_codeautolink.egg-info → sphinx_codeautolink-0.15.2}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sphinx-codeautolink
|
|
3
|
-
Version: 0.15.
|
|
3
|
+
Version: 0.15.2
|
|
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>
|
|
@@ -47,8 +47,11 @@ Classifier: Topic :: Documentation :: Sphinx
|
|
|
47
47
|
Classifier: Topic :: Software Development :: Documentation
|
|
48
48
|
Requires-Python: >=3.7
|
|
49
49
|
Description-Content-Type: text/x-rst
|
|
50
|
-
Provides-Extra: ipython
|
|
51
50
|
License-File: LICENSE
|
|
51
|
+
Requires-Dist: sphinx>=3.2.0
|
|
52
|
+
Requires-Dist: beautifulsoup4>=4.8.1
|
|
53
|
+
Provides-Extra: ipython
|
|
54
|
+
Requires-Dist: ipython!=8.7.0; extra == "ipython"
|
|
52
55
|
|
|
53
56
|
sphinx-codeautolink
|
|
54
57
|
===================
|
|
@@ -51,6 +51,13 @@ Caveats
|
|
|
51
51
|
|
|
52
52
|
Sphinx semantics
|
|
53
53
|
----------------
|
|
54
|
+
Warnings
|
|
55
|
+
********
|
|
56
|
+
For an easier time with debugging, we recommend enabling all warnings,
|
|
57
|
+
treating them as errors with ``-W`` and only ignoring specific warning types
|
|
58
|
+
with :confval:`suppress_warnings`. This is also easier if
|
|
59
|
+
:confval:`show_warning_types` is set.
|
|
60
|
+
|
|
54
61
|
Clean build
|
|
55
62
|
***********
|
|
56
63
|
For correct partial builds, code reference information is saved to a file
|
|
@@ -64,6 +71,7 @@ Sphinx cache
|
|
|
64
71
|
A function specified in :confval:`codeautolink_custom_blocks` prevents Sphinx
|
|
65
72
|
from caching documentation results. Consider using an importable instead.
|
|
66
73
|
For more information, see the discussion in :issue:`76`.
|
|
74
|
+
You can also suppress the warning.
|
|
67
75
|
|
|
68
76
|
Parallel build and custom parsers
|
|
69
77
|
*********************************
|
|
@@ -32,10 +32,12 @@ extensions = [
|
|
|
32
32
|
# Builtin options
|
|
33
33
|
html_theme = "sphinx_rtd_theme"
|
|
34
34
|
python_use_unqualified_type_names = True
|
|
35
|
+
show_warning_types = True
|
|
35
36
|
|
|
36
37
|
# Extension options
|
|
37
38
|
codeautolink_autodoc_inject = True
|
|
38
39
|
codeautolink_custom_blocks = {"python3": None, "pycon3": clean_pycon}
|
|
40
|
+
suppress_warnings = ["config.cache"]
|
|
39
41
|
|
|
40
42
|
autodoc_default_options = {"members": True, "undoc-members": True}
|
|
41
43
|
autodoc_typehints = "description"
|
|
@@ -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.15.2 (2024-06-03)
|
|
12
|
+
-------------------
|
|
13
|
+
- Fix matching of ``import a, b`` (:issue:`142`)
|
|
14
|
+
|
|
15
|
+
0.15.1 (2024-04-17)
|
|
16
|
+
-------------------
|
|
17
|
+
- Fix linking blocks with line numbers (:issue:`137`)
|
|
18
|
+
- Use safer version of ``mro`` to support ``type`` (:issue:`120`)
|
|
19
|
+
|
|
11
20
|
0.15.0 (2023-02-05)
|
|
12
21
|
-------------------
|
|
13
22
|
- Fix handling of syntax errors in parsed blocks (:issue:`135`)
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/src/sphinx_codeautolink/__init__.py
RENAMED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"""Sphinx extension for linking code examples to reference documentation."""
|
|
2
|
+
|
|
2
3
|
from sphinx.application import Sphinx
|
|
3
4
|
|
|
4
5
|
from .extension import SphinxCodeAutoLink, backref, directive
|
|
5
6
|
from .extension.block import clean_ipython, clean_pycon # NOQA
|
|
6
7
|
|
|
7
|
-
__version__ = "0.15.
|
|
8
|
+
__version__ = "0.15.2"
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
def setup(app: Sphinx):
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/src/sphinx_codeautolink/extension/block.py
RENAMED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"""Code block processing."""
|
|
2
|
+
|
|
2
3
|
import re
|
|
4
|
+
from copy import copy
|
|
3
5
|
from dataclasses import dataclass
|
|
4
6
|
from pathlib import Path
|
|
5
7
|
from typing import Callable, Dict, List, Optional, Tuple, Union
|
|
@@ -304,7 +306,13 @@ def link_html(
|
|
|
304
306
|
|
|
305
307
|
for trans in transforms:
|
|
306
308
|
for ix in range(len(inners)):
|
|
307
|
-
|
|
309
|
+
candidate = copy(inners[ix])
|
|
310
|
+
|
|
311
|
+
# remove line numbers for matching
|
|
312
|
+
for lineno in candidate.find_all("span", attrs={"class": "linenos"}):
|
|
313
|
+
lineno.extract()
|
|
314
|
+
|
|
315
|
+
if trans.source.rstrip() == "".join(candidate.strings).rstrip():
|
|
308
316
|
inner = inners.pop(ix)
|
|
309
317
|
break
|
|
310
318
|
else:
|
|
@@ -368,12 +376,14 @@ no_dot_prere = r'(?<!<span class="o">\.</span>)()'
|
|
|
368
376
|
call_dot_prere = r'(\)</span>\s*<span class="o">\.</span>\s*)'
|
|
369
377
|
import_prere = (
|
|
370
378
|
r'((<span class="kn">import</span>\s+(<span class="p">\(</span>\s*)?)'
|
|
371
|
-
r'|(<span class="
|
|
379
|
+
r'|(<span class="[op]">,</span>\s*))'
|
|
372
380
|
)
|
|
373
381
|
from_prere = r'(<span class="kn">from</span>\s+)'
|
|
374
382
|
|
|
375
383
|
no_dot_postre = r'(?!(<span class="o">\.)|(</a>))'
|
|
376
|
-
import_postre =
|
|
384
|
+
import_postre = (
|
|
385
|
+
r'(?=($)|(\s+)|(<span class="[op]">,</span>)|(<span class="p">\)))(?!</a>)'
|
|
386
|
+
)
|
|
377
387
|
from_postre = r'(?=\s*<span class="kn">import</span>)'
|
|
378
388
|
|
|
379
389
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""Resolve import locations and type hints."""
|
|
2
|
+
|
|
2
3
|
from dataclasses import dataclass
|
|
3
4
|
from functools import lru_cache
|
|
4
5
|
from importlib import import_module
|
|
@@ -82,7 +83,7 @@ def locate_type(cursor: Cursor, components: Tuple[str, ...], inventory) -> Curso
|
|
|
82
83
|
pass
|
|
83
84
|
|
|
84
85
|
if isclass(previous.value) and cursor.location not in inventory:
|
|
85
|
-
for val in previous.value.
|
|
86
|
+
for val in previous.value.__mro__:
|
|
86
87
|
name = fully_qualified_name(val)
|
|
87
88
|
if name + "." + component in inventory:
|
|
88
89
|
previous.location = name
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2/src/sphinx_codeautolink.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sphinx-codeautolink
|
|
3
|
-
Version: 0.15.
|
|
3
|
+
Version: 0.15.2
|
|
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>
|
|
@@ -47,8 +47,11 @@ Classifier: Topic :: Documentation :: Sphinx
|
|
|
47
47
|
Classifier: Topic :: Software Development :: Documentation
|
|
48
48
|
Requires-Python: >=3.7
|
|
49
49
|
Description-Content-Type: text/x-rst
|
|
50
|
-
Provides-Extra: ipython
|
|
51
50
|
License-File: LICENSE
|
|
51
|
+
Requires-Dist: sphinx>=3.2.0
|
|
52
|
+
Requires-Dist: beautifulsoup4>=4.8.1
|
|
53
|
+
Provides-Extra: ipython
|
|
54
|
+
Requires-Dist: ipython!=8.7.0; extra == "ipython"
|
|
52
55
|
|
|
53
56
|
sphinx-codeautolink
|
|
54
57
|
===================
|
|
@@ -63,6 +63,7 @@ tests/extension/ref/custom_block_imported.txt
|
|
|
63
63
|
tests/extension/ref/empty_project.txt
|
|
64
64
|
tests/extension/ref/inventory_map_is_needed.txt
|
|
65
65
|
tests/extension/ref/inventory_map_not_needed.txt
|
|
66
|
+
tests/extension/ref/line_numbers.txt
|
|
66
67
|
tests/extension/ref/non_python_block.txt
|
|
67
68
|
tests/extension/ref/preface_concatenated.txt
|
|
68
69
|
tests/extension/ref/preface_consumed_non_python.txt
|
|
@@ -91,6 +92,7 @@ tests/extension/ref/ref_import_as.txt
|
|
|
91
92
|
tests/extension/ref/ref_import_from.txt
|
|
92
93
|
tests/extension/ref/ref_import_from_complex.txt
|
|
93
94
|
tests/extension/ref/ref_import_multiple.txt
|
|
95
|
+
tests/extension/ref/ref_import_multiple_libs.txt
|
|
94
96
|
tests/extension/ref/ref_import_star.txt
|
|
95
97
|
tests/extension/ref/ref_import_submodule.txt
|
|
96
98
|
tests/extension/ref/ref_imported_func.txt
|
|
@@ -28,7 +28,7 @@ codeautolink_warn_on_failed_resolve = True
|
|
|
28
28
|
"""
|
|
29
29
|
|
|
30
30
|
any_whitespace = re.compile(r"\s*")
|
|
31
|
-
ref_tests =
|
|
31
|
+
ref_tests = [(p.name, p) for p in Path(__file__).with_name("ref").glob("*.txt")]
|
|
32
32
|
ref_xfails = {
|
|
33
33
|
"ref_fluent_attrs.txt": sys.version_info < (3, 8),
|
|
34
34
|
"ref_fluent_call.txt": sys.version_info < (3, 8),
|
|
@@ -47,8 +47,8 @@ def assert_links(file: Path, links: list):
|
|
|
47
47
|
assert s == link
|
|
48
48
|
|
|
49
49
|
|
|
50
|
-
@pytest.mark.parametrize("file", ref_tests)
|
|
51
|
-
def test_references(file: Path, tmp_path: Path):
|
|
50
|
+
@pytest.mark.parametrize(("name", "file"), ref_tests)
|
|
51
|
+
def test_references(name: str, file: Path, tmp_path: Path):
|
|
52
52
|
"""
|
|
53
53
|
Basic extension tests for reference building.
|
|
54
54
|
|
|
@@ -72,6 +72,7 @@ def test_references(file: Path, tmp_path: Path):
|
|
|
72
72
|
links = []
|
|
73
73
|
|
|
74
74
|
files = {"conf.py": default_conf + conf, "index.rst": index}
|
|
75
|
+
print(f"Building file {name}.")
|
|
75
76
|
result_dir = _sphinx_build(tmp_path, "html", files)
|
|
76
77
|
|
|
77
78
|
assert_links(result_dir / "index.html", links)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
json
|
|
2
|
+
math
|
|
3
|
+
# split
|
|
4
|
+
extensions = [
|
|
5
|
+
"sphinx.ext.intersphinx",
|
|
6
|
+
"sphinx_codeautolink",
|
|
7
|
+
]
|
|
8
|
+
intersphinx_mapping = {"python": ('https://docs.python.org/3/', None)}
|
|
9
|
+
# split
|
|
10
|
+
Test project
|
|
11
|
+
============
|
|
12
|
+
|
|
13
|
+
.. code:: python
|
|
14
|
+
|
|
15
|
+
import json, math
|
|
16
|
+
|
|
17
|
+
.. automodule:: test_project
|
|
@@ -60,7 +60,7 @@ commands = pydocstyle src
|
|
|
60
60
|
description = Build Sphinx documentation
|
|
61
61
|
allowlist_externals = sphinx-build
|
|
62
62
|
change_dir = docs
|
|
63
|
-
commands = sphinx-build -M html src build
|
|
63
|
+
commands = sphinx-build -M html src build -W
|
|
64
64
|
|
|
65
65
|
[testenv:black-check]
|
|
66
66
|
description = Check code formatting
|
|
@@ -103,7 +103,7 @@ commands_pre =
|
|
|
103
103
|
commands =
|
|
104
104
|
python -m build
|
|
105
105
|
twine check --strict dist/*
|
|
106
|
-
twine upload dist/*
|
|
106
|
+
twine upload dist/* --config-file .pypirc
|
|
107
107
|
commands_post =
|
|
108
108
|
lin,mac: rm -r dist
|
|
109
109
|
win: cmd /c rmdir /s /q dist
|
|
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.15.0 → sphinx_codeautolink-0.15.2}/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.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/fail/missing_inventory.txt
RENAMED
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/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
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/fail/skip_invalid.txt
RENAMED
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/concat_default.txt
RENAMED
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/concat_off.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/concat_on_breaks.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/empty_project.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/non_python_block.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/preface_global.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/preface_multiline.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/preface_multiple.txt
RENAMED
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/preface_single.txt
RENAMED
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_assign_targets.txt
RENAMED
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_builtins.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_chain_call.txt
RENAMED
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_class_attr.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_decorator.txt
RENAMED
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_doctest.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_fluent_attrs.txt
RENAMED
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_fluent_call.txt
RENAMED
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_func_no_module.txt
RENAMED
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_import_as.txt
RENAMED
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_import_from.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_import_star.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_imported_func.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_inherited.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_ipython.txt
RENAMED
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_ipython3.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_ipython_syntax.txt
RENAMED
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_optional.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/ref_shadow_builtin.txt
RENAMED
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/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.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/ref/skip_section.txt
RENAMED
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/src/parser_func.py
RENAMED
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/src/test_project/sub.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/table/tab_manual_empty.txt
RENAMED
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/tests/extension/table/tab_manual_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sphinx-codeautolink-0.15.0 → sphinx_codeautolink-0.15.2}/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
|