@@ -1488,14 +1488,17 @@ def _dp(s, val=None):
1488
1488
# _dp("isinst", isinstance(node.frame(), nodes.ClassDef))
1489
1489
# _dp("funcdef", isinstance(called, nodes.FunctionDef))
1490
1490
_dp ("called" , called )
1491
- _dp ("bound method init in called" , "BoundMethod __init__ of builtins.object" in str (called ))
1491
+ _dp (
1492
+ "bound method init in called" ,
1493
+ "BoundMethod __init__ of builtins.object" in str (called ),
1494
+ )
1492
1495
_dp ("called.args" , called .args )
1493
1496
_dp ("frame body" , node .frame ().body )
1494
1497
# _dp("called in frame body", called in node.frame().body)
1495
1498
# _dp("dec names", called.decoratornames())
1496
1499
1497
1500
def _call_site_has_args (cs ):
1498
- "True if any args passed."
1501
+ """ True if any args passed."" "
1499
1502
has_args = (
1500
1503
False
1501
1504
or len (cs .positional_arguments ) > 0
@@ -1514,7 +1517,9 @@ def _call_site_has_args(cs):
1514
1517
# is handled elsewhere.
1515
1518
if "BoundMethod __init__ of builtins.object" in str (called ):
1516
1519
if _call_site_has_args (call_site ):
1517
- self .add_message ("too-many-function-args" , node = node , args = ("__init__" ,))
1520
+ self .add_message (
1521
+ "too-many-function-args" , node = node , args = ("__init__" ,)
1522
+ )
1518
1523
return
1519
1524
1520
1525
if len (called .argnames ()) != len (set (called .argnames ())):
0 commit comments