Skip to content

Commit c5ecd70

Browse files
committed
fix: Deactivate Pydantic logic if v1 is installed instead of v2
Issue-240: #240
1 parent e14d5b4 commit c5ecd70

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/mkdocstrings_handlers/python/config.py

+5
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@
2525
# "yaml.schemas": {
2626
# "https://squidfunk.github.io/mkdocs-material/schema.json": "mkdocs.yml"
2727
# }
28+
import pydantic
29+
30+
if getattr(pydantic, "__version__", "1.").startswith("1."):
31+
raise ImportError # noqa: TRY301
32+
2833
from inspect import cleandoc
2934

3035
from pydantic import Field as BaseField

0 commit comments

Comments
 (0)