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 ad415cb commit 93db908Copy full SHA for 93db908
mypy/plugins/attrs.py
@@ -1034,7 +1034,10 @@ def _get_attrs_init_type(typ: Instance) -> CallableType | None | AnyType:
1034
return None
1035
# case 1: normal FuncDef
1036
if isinstance(init_method, FuncDef) and isinstance(init_method.type, CallableType):
1037
- return init_method.type
+ if getattr(init_method, "plugin_generated", False):
1038
+ return init_method.type
1039
+ else:
1040
+ return AnyType(TypeOfAny.special_form)
1041
1042
# case 2: overloaded method
1043
if isinstance(init_method, OverloadedFuncDef) and isinstance(init_method.type, Overloaded):
0 commit comments