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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy