We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fec18af commit daae60aCopy full SHA for daae60a
src/useq/_base_model.py
@@ -1,4 +1,5 @@
1
from pathlib import Path
2
+from re import findall
3
from types import MappingProxyType
4
from typing import (
5
IO,
@@ -26,7 +27,7 @@
26
27
_T = TypeVar("_T", bound="FrozenModel")
28
_Y = TypeVar("_Y", bound="UseqModel")
29
-PYDANTIC_VERSION = tuple(int(x) for x in pydantic.__version__.split(".")[:3])
30
+PYDANTIC_VERSION = tuple(int(x) for x in findall(r"\d_", pydantic.__version__)[:3])
31
GET_DEFAULT_KWARGS: dict = {}
32
if PYDANTIC_VERSION >= (2, 10):
33
GET_DEFAULT_KWARGS = {"validated_data": {}}
0 commit comments