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 2bb782c commit 423e526Copy full SHA for 423e526
mypy/plugins/attrs.py
@@ -1035,11 +1035,7 @@ def _get_attrs_init_type(typ: Instance) -> CallableType | None | AnyType:
1035
1036
# case 1: normal FuncDef
1037
if isinstance(init_method, FuncDef) and isinstance(init_method.type, CallableType):
1038
- init_node = typ.type.get("__init__") or typ.type.get(ATTRS_INIT_NAME)
1039
- if init_node is None or not init_node.plugin_generated:
1040
- return None
1041
- else:
1042
- return init_method.type
+ return init_method.type
1043
1044
# case 2: overloaded method
1045
if isinstance(init_method, OverloadedFuncDef) and isinstance(init_method.type, Overloaded):
0 commit comments