Skip to content

Commit bc12cf4

Browse files
Fix issue with extended template location (#56)
Tested on separate project. Could not immediately reproduce in test project.
1 parent 16d42a1 commit bc12cf4

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
*Note that versions roughly correspond to the version of mkdocstrings-python that they
44
are compatible with.*
55

6+
## 2.0.1
7+
8+
* Fix extended template configuration (#56)
9+
610
## 2.0.0
711

812
* Depends on mkdocstrings-python >=2.0 and mkdocstrings >=1.0

pixi.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.0.0
1+
2.0.1

src/mkdocstrings_handlers/python_xref/handler.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,17 @@ def render(self, data: CollectorItem, options: PythonOptions, locale: str | None
9595

9696
def get_templates_dir(self, handler: Optional[str] = None) -> Path:
9797
"""See [render][.barf]"""
98+
# use same templates as standard python handler
9899
if handler == self.name:
99100
handler = 'python'
100101
return super().get_templates_dir(handler)
101102

103+
def get_extended_templates_dirs(self, handler: str) -> list[Path]:
104+
# use same templates as standard python handler
105+
if handler == self.name:
106+
handler = 'python'
107+
return super().get_extended_templates_dirs(handler)
108+
102109
def _check_ref(self, ref : str, exclude: list[str | re.Pattern] = []) -> bool:
103110
"""Check for existence of reference"""
104111
for ex in exclude:

0 commit comments

Comments
 (0)