diff --git a/mypy/messages.py b/mypy/messages.py index 70d79384c1a9..b5f6ca339d6a 100644 --- a/mypy/messages.py +++ b/mypy/messages.py @@ -944,7 +944,7 @@ def could_not_infer_type_arguments(self, callee_type: CallableType, n: int, self.fail('Cannot infer function type argument', context) def invalid_var_arg(self, typ: Type, context: Context) -> None: - self.fail('List or tuple expected as variable arguments', context) + self.fail('List or tuple expected as variadic arguments', context) def invalid_keyword_var_arg(self, typ: Type, is_mapping: bool, context: Context) -> None: typ = get_proper_type(typ) diff --git a/test-data/unit/check-varargs.test b/test-data/unit/check-varargs.test index d93618b85ba9..4dc10c9f7489 100644 --- a/test-data/unit/check-varargs.test +++ b/test-data/unit/check-varargs.test @@ -275,7 +275,7 @@ class CC(C): pass a = None # type: A f(*None) -f(*a) # E: List or tuple expected as variable arguments +f(*a) # E: List or tuple expected as variadic arguments f(*(a,)) def f(a: 'A') -> None: @@ -544,9 +544,9 @@ if int(): if int(): b, b = f(b, b, *aa) # E: Argument 3 to "f" has incompatible type "*List[A]"; expected "B" if int(): - a, b = f(a, *a) # E: List or tuple expected as variable arguments + a, b = f(a, *a) # E: List or tuple expected as variadic arguments if int(): - a, b = f(*a) # E: List or tuple expected as variable arguments + a, b = f(*a) # E: List or tuple expected as variadic arguments if int(): a, a = f(*aa) @@ -758,5 +758,5 @@ bar(*good1) bar(*good2) bar(*good3) bar(*bad1) # E: Argument 1 to "bar" has incompatible type "*I[str]"; expected "float" -bar(*bad2) # E: List or tuple expected as variable arguments +bar(*bad2) # E: List or tuple expected as variadic arguments [builtins fixtures/dict.pyi]