@@ -1467,19 +1467,6 @@ def visit_call(self, node: nodes.Call) -> None:
1467
1467
"""Check that called functions/methods are inferred to callable objects,
1468
1468
and that passed arguments match the parameters in the inferred function.
1469
1469
"""
1470
-
1471
- is_super = False
1472
- if (
1473
- isinstance (node .func , nodes .Attribute )
1474
- and node .func .attrname == "__init__"
1475
- and isinstance (node .func .expr , nodes .Call )
1476
- and isinstance (node .func .expr .func , nodes .Name )
1477
- and node .func .expr .func .name == "super"
1478
- ):
1479
- inferred = safe_infer (node .func .expr )
1480
- if isinstance (inferred , astroid .objects .Super ):
1481
- is_super = True
1482
-
1483
1470
called = safe_infer (node .func , compare_constructors = True )
1484
1471
1485
1472
self ._check_not_callable (node , called )
@@ -1501,7 +1488,7 @@ def visit_call(self, node: nodes.Call) -> None:
1501
1488
self ._check_isinstance_args (node , callable_name )
1502
1489
# Built-in functions have no argument information, but we know
1503
1490
# super() only takes self.
1504
- if is_super and utils .is_builtin_object (called ):
1491
+ if self . _is_super ( node ) and utils .is_builtin_object (called ):
1505
1492
if (
1506
1493
(call_site := astroid .arguments .CallSite .from_call (node ))
1507
1494
and call_site .positional_arguments
0 commit comments