We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7012189 commit a7f95cdCopy full SHA for a7f95cd
mypy/stubgen.py
@@ -863,9 +863,10 @@ def visit_class_def(self, o: ClassDef) -> None:
863
self.dataclass_field_specifier = spec.field_specifiers
864
is_pydantic_model = False
865
for base_type_expr in o.base_type_exprs:
866
- if isinstance(base_type_expr, (NameExpr, MemberExpr)) and self.get_fullname(
867
- base_type_expr
868
- ).endswith("pydantic.BaseModel"):
+ if (
+ isinstance(base_type_expr, (NameExpr, MemberExpr))
+ and self.get_fullname(base_type_expr) == "pydantic.BaseModel"
869
+ ):
870
is_pydantic_model = True
871
break
872
self.processing_pydantic_model = is_pydantic_model
0 commit comments