We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8db003c commit e29f7a8Copy full SHA for e29f7a8
RELEASE.md
@@ -0,0 +1,3 @@
1
+Release type: minor
2
+
3
+Fix import error in `strawberry.ext.mypy_plugin` for users who don't use pydantic.
strawberry/ext/mypy_plugin.py
@@ -52,7 +52,6 @@
52
)
53
from mypy.typevars import fill_typevars
54
from mypy.util import get_unique_redefinition_name
55
-from strawberry.experimental.pydantic._compat import IS_PYDANTIC_V1
56
57
# Backwards compatible with the removal of `TypeVarDef` in mypy 0.920.
58
try:
@@ -64,8 +63,11 @@
64
63
65
from pydantic.mypy import METADATA_KEY as PYDANTIC_METADATA_KEY
66
from pydantic.mypy import PydanticModelField
67
+ from strawberry.experimental.pydantic._compat import IS_PYDANTIC_V1
68
except ImportError:
69
PYDANTIC_METADATA_KEY = ""
70
+ IS_PYDANTIC_V1 = False
71
72
73
if TYPE_CHECKING:
0 commit comments