Skip to content

Commit 17ebfea

Browse files
authored
Update checkexpr.py
Delete unrelated changes
1 parent e93c401 commit 17ebfea

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

mypy/checkexpr.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1453,32 +1453,6 @@ def check_call_expr_with_callee_type(
14531453
member: str | None = None,
14541454
) -> Type:
14551455

1456-
proper_callee = get_proper_type(callee_type)
1457-
1458-
is_constructor_call = False
1459-
if isinstance(e.callee, RefExpr):
1460-
node = e.callee.node
1461-
if node is not None and hasattr(node, "name"):
1462-
is_constructor_call = node.name == "__init__"
1463-
elif callable_name is None:
1464-
# direct class call without member name
1465-
is_constructor_call = True
1466-
1467-
object_type = get_proper_type(object_type)
1468-
if (
1469-
isinstance(proper_callee, CallableType)
1470-
and isinstance(object_type, Instance)
1471-
and is_constructor_call
1472-
):
1473-
target_name = object_type.type.name
1474-
arg_names_set = set(e.arg_names or [])
1475-
1476-
for name, kind in zip(proper_callee.arg_names, proper_callee.arg_kinds):
1477-
if name is not None and kind in (ARG_NAMED, ARG_POS):
1478-
if name not in arg_names_set:
1479-
if target_name == "misc":
1480-
continue # Skip error for miscellaneous/unknown classes
1481-
14821456
"""Type check call expression.
14831457
14841458
The callee_type should be used as the type of callee expression. In particular,

0 commit comments

Comments
 (0)