Skip to content

Commit 806cce8

Browse files
committed
The fullname of BaseModel is used to detect pydantic models
1 parent 2f57b1d commit 806cce8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypy/stubgen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@ def visit_class_def(self, o: ClassDef) -> None:
813813
for base_type_expr in o.base_type_exprs:
814814
if isinstance(base_type_expr, (NameExpr, MemberExpr)) and self.get_fullname(
815815
base_type_expr
816-
).endswith("BaseModel"):
816+
).endswith("pydantic.BaseModel"):
817817
is_pydantic_model = True
818818
break
819819
self.processing_pydantic_model = is_pydantic_model

0 commit comments

Comments
 (0)