Skip to content

Commit 423e526

Browse files
committed
Revised version of attrs.py based on the feedback
1 parent 2bb782c commit 423e526

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

mypy/plugins/attrs.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,11 +1035,7 @@ def _get_attrs_init_type(typ: Instance) -> CallableType | None | AnyType:
10351035

10361036
# case 1: normal FuncDef
10371037
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
1038+
return init_method.type
10431039

10441040
# case 2: overloaded method
10451041
if isinstance(init_method, OverloadedFuncDef) and isinstance(init_method.type, Overloaded):

0 commit comments

Comments
 (0)