File: mkdocstrings-python_2.diff

package info (click to toggle)
python-markdown 3.10-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,208 kB
  • sloc: python: 12,733; makefile: 66; sh: 7
file content (88 lines) | stat: -rw-r--r-- 5,157 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
From: Dmitry Shachnev <mitya57@debian.org>
Date: Thu, 11 Dec 2025 18:40:17 +0300
Subject: Make the docs build successfully with mkdocstrings-python 2.0

(cherry picked from commit 89112c293f7b399ae8808f3a06306f46601e9684)
---
 docs/templates/python/nature/attribute.html.jinja |  2 +-
 docs/templates/python/nature/class.html.jinja     |  2 +-
 docs/templates/python/nature/function.html.jinja  |  2 +-
 docs/templates/python/nature/module.html.jinja    |  2 +-
 mkdocs.yml                                        | 11 ++++++-----
 5 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/docs/templates/python/nature/attribute.html.jinja b/docs/templates/python/nature/attribute.html.jinja
index a40d672..44dc11d 100644
--- a/docs/templates/python/nature/attribute.html.jinja
+++ b/docs/templates/python/nature/attribute.html.jinja
@@ -1,7 +1,7 @@
 {% extends "_base/attribute.html.jinja" %}
 
 {% block heading scoped %}
-  <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>
+  <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>
   {% if config.show_symbol_type_heading %}<code class="doc-symbol doc-symbol-heading doc-symbol-attribute"></code>{% endif %}
   {%+ filter highlight(language="python", inline=True) %}
     {{ attribute_name }}{% if attribute.annotation %}: {{ attribute.annotation }}{% endif %}
diff --git a/docs/templates/python/nature/class.html.jinja b/docs/templates/python/nature/class.html.jinja
index 4cf19ec..4076aa9 100644
--- a/docs/templates/python/nature/class.html.jinja
+++ b/docs/templates/python/nature/class.html.jinja
@@ -1,6 +1,6 @@
 {% extends "_base/class.html.jinja" %}
 
 {% block heading scoped %}
-  <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>
+  <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>
   {{ super() }}
 {% endblock heading %}
diff --git a/docs/templates/python/nature/function.html.jinja b/docs/templates/python/nature/function.html.jinja
index 8bbca47..c2f4b2c 100644
--- a/docs/templates/python/nature/function.html.jinja
+++ b/docs/templates/python/nature/function.html.jinja
@@ -1,6 +1,6 @@
 {% extends "_base/function.html.jinja" %}
 
 {% block heading scoped %}
-  <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>
+  <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>
   {{ super() }}
 {% endblock heading %}
diff --git a/docs/templates/python/nature/module.html.jinja b/docs/templates/python/nature/module.html.jinja
index 465ef1d..f6b99bb 100644
--- a/docs/templates/python/nature/module.html.jinja
+++ b/docs/templates/python/nature/module.html.jinja
@@ -1,6 +1,6 @@
 {% extends "_base/module.html.jinja" %}
 
 {% block heading scoped %}
-  <a class="doc-source-link" href="{{ config.source.repo }}/tree/{{ config.source.tag }}/{{ module.relative_filepath }}" title="{{ config.source.title }}">&lsaquo;&rsaquo;</a>
+  <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>
   {{ super() }}
 {% endblock heading %}
diff --git a/mkdocs.yml b/mkdocs.yml
index 92f6ccc..a88d8c1 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -81,7 +81,7 @@ plugins:
     custom_templates: docs/templates
     handlers:
       python:
-        import:
+        inventories:
         - https://docs.python.org/3/objects.inv
         options:
           annotations_path: brief
@@ -113,7 +113,8 @@ plugins:
           show_symbol_type_toc: false
           signature_crossrefs: false
           summary: true
-          source:
-            repo: https://github.com/Python-Markdown/markdown
-            tag: !!python/name:markdown.__version__
-            title: "View source code on GitHub."
+          extra:
+            source:
+              repo: https://github.com/Python-Markdown/markdown
+              tag: !!python/name:markdown.__version__
+              title: "View source code on GitHub."