Skip to content

Commit 344efed

Browse files
committed
Refine fix: only suppress suggestion when keyword args present
1 parent e38a78e commit 344efed

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mypy/fastparse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1957,7 +1957,7 @@ def visit_Call(self, e: Call) -> Type:
19571957

19581958
if not isinstance(self.parent(), ast3.List):
19591959
note = None
1960-
if constructor and not e.keywords and len(e.args) == 1:
1960+
if constructor and not e.keywords:
19611961
note = "Suggestion: use {0}[...] instead of {0}(...)".format(constructor)
19621962
return self.invalid_type(e, note=note)
19631963
if not constructor:

0 commit comments

Comments
 (0)