Skip to content

Commit 89112c2

Browse files
authored
Make the docs build successfully with mkdocstrings-python 2.0
1 parent 961856c commit 89112c2

File tree

7 files changed

+12
-10
lines changed

7 files changed

+12
-10
lines changed

docs/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ See the [Contributing Guide](contributing.md) for details.
1515
### Fixed
1616

1717
* Ensure nested elements inside inline comments are properly unescaped (#1571).
18+
* Make the docs build successfully with mkdocstrings-python 2.0 (#1575).
1819

1920
## [3.10.0] - 2025-11-03
2021

docs/templates/python/nature/attribute.html.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% extends "_base/attribute.html.jinja" %}
22

33
{% block heading scoped %}
4-
<a class="doc-source-link" href="{{ config.source.repo }}/tree/{{ config.source.tag }}/{{ attribute.relative_filepath }}#L{{ attribute.lineno }}{% if attribute.endlineno > attribute.lineno %}-L{{ attribute.endlineno }}{% endif %}" title='View source code on GitHub'>&lsaquo;&rsaquo;</a>
4+
<a class="doc-source-link" href="{{ config.extra.source.repo }}/tree/{{ config.extra.source.tag }}/{{ attribute.relative_filepath }}#L{{ attribute.lineno }}{% if attribute.endlineno > attribute.lineno %}-L{{ attribute.endlineno }}{% endif %}" title='View source code on GitHub'>&lsaquo;&rsaquo;</a>
55
{% if config.show_symbol_type_heading %}<code class="doc-symbol doc-symbol-heading doc-symbol-attribute"></code>{% endif %}
66
{%+ filter highlight(language="python", inline=True) %}
77
{{ attribute_name }}{% if attribute.annotation %}: {{ attribute.annotation }}{% endif %}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{% extends "_base/class.html.jinja" %}
22

33
{% block heading scoped %}
4-
<a class="doc-source-link" href="{{ config.source.repo }}/tree/{{ config.source.tag }}/{{ class.relative_filepath }}#L{{ class.lineno }}" title="{{ config.source.title }}">&lsaquo;&rsaquo;</a>
4+
<a class="doc-source-link" href="{{ config.extra.source.repo }}/tree/{{ config.extra.source.tag }}/{{ class.relative_filepath }}#L{{ class.lineno }}" title="{{ config.extra.source.title }}">&lsaquo;&rsaquo;</a>
55
{{ super() }}
66
{% endblock heading %}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{% extends "_base/function.html.jinja" %}
22

33
{% block heading scoped %}
4-
<a class="doc-source-link" href="{{ config.source.repo }}/tree/{{ config.source.tag }}/{{ function.relative_filepath }}#L{{ function.lineno }}{% if function.endlineno > function.lineno %}-L{{ function.endlineno }}{% endif %}" title="{{ config.source.title }}">&lsaquo;&rsaquo;</a>
4+
<a class="doc-source-link" href="{{ config.extra.source.repo }}/tree/{{ config.extra.source.tag }}/{{ function.relative_filepath }}#L{{ function.lineno }}{% if function.endlineno > function.lineno %}-L{{ function.endlineno }}{% endif %}" title="{{ config.extra.source.title }}">&lsaquo;&rsaquo;</a>
55
{{ super() }}
66
{% endblock heading %}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{% extends "_base/module.html.jinja" %}
22

33
{% block heading scoped %}
4-
<a class="doc-source-link" href="{{ config.source.repo }}/tree/{{ config.source.tag }}/{{ module.relative_filepath }}" title="{{ config.source.title }}">&lsaquo;&rsaquo;</a>
4+
<a class="doc-source-link" href="{{ config.extra.source.repo }}/tree/{{ config.extra.source.tag }}/{{ module.relative_filepath }}" title="{{ config.extra.source.title }}">&lsaquo;&rsaquo;</a>
55
{{ super() }}
66
{% endblock heading %}

mkdocs.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ plugins:
8181
custom_templates: docs/templates
8282
handlers:
8383
python:
84-
import:
84+
inventories:
8585
- https://docs.python.org/3/objects.inv
8686
options:
8787
annotations_path: brief
@@ -113,7 +113,8 @@ plugins:
113113
show_symbol_type_toc: false
114114
signature_crossrefs: false
115115
summary: true
116-
source:
117-
repo: https://github.com/Python-Markdown/markdown
118-
tag: !!python/name:markdown.__version__
119-
title: "View source code on GitHub."
116+
extra:
117+
source:
118+
repo: https://github.com/Python-Markdown/markdown
119+
tag: !!python/name:markdown.__version__
120+
title: "View source code on GitHub."

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ docs = [
5353
'mkdocs>=1.6',
5454
'mkdocs-nature>=0.6',
5555
'mdx_gh_links>=0.2',
56-
"mkdocstrings[python]",
56+
"mkdocstrings[python]>=0.28.3",
5757
"mkdocs-gen-files",
5858
"mkdocs-section-index",
5959
"mkdocs-literate-nav",

0 commit comments

Comments
 (0)