8000 refactor: Support Griffe 0.26 · FasterSpeeding/python@075735c · GitHub
[go: up one dir, main page]

Skip to content

Commit 075735c

Browse files
committed
refactor: Support Griffe 0.26
1 parent a190e2c commit 075735c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/mkdocstrings_handlers/python/handler.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
from contextlib import suppress
1313
from typing import TYPE_CHECKING, Any, BinaryIO, Iterator, Mapping
1414

15-
from griffe.agents.extensions import load_extensions
1615
from griffe.collections import LinesCollection, ModulesCollection
1716
from griffe.docstrings.parsers import Parser
1817
from griffe.exceptions import AliasResolutionError
@@ -25,6 +24,12 @@
2524

2625
from mkdocstrings_handlers.python import rendering
2726

27+
try:
28+
from griffe.extensions import load_extensions
29+
except ImportError:
30+
# TODO: remove once support for Griffe 0.25 is dropped
31+
from griffe.agents.extensions import load_extensions # type: ignore[no-redef]
32+
2833
if TYPE_CHECKING:
2934
from markdown import Markdown
3035

0 commit comments

Comments
 (0)
0