Skip to content

Commit 54b33c4

Browse files
committed
formatting
1 parent 1beb076 commit 54b33c4

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

mypy/messages.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,23 +1100,23 @@ def no_variant_matches_arguments(
11001100
for_func = ""
11011101

11021102
# For keyword argument errors
1103-
unexpected_kwargs: list[tuple[str, Type]] = []
1104-
if arg_names is not None and arg_kinds is not None:
1103+
unexpected_kwargs: list[tuple[str, Type]] = []
1104+
if arg_names is not None and arg_kinds is not None:
11051105
all_valid_kwargs: set[str] = set()
11061106
for item in overload.items:
1107-
for i, arg_name in enumerate(item.arg_names):
1107+
for i, arg_name in enumerate(item.arg_names):
11081108
if arg_name is not None and item.arg_kinds[i] != ARG_STAR:
11091109
all_valid_kwargs.add(arg_name)
11101110
if item.is_kw_arg:
11111111
all_valid_kwargs.clear()
11121112
break
11131113

1114-
if all_valid_kwargs:
1114+
if all_valid_kwargs:
11151115
for i, (arg_name, arg_kind) in enumerate(zip(arg_names, arg_kinds)):
1116-
if arg_kind == ARG_NAMED and arg_name is not None:
1116+
if arg_kind == ARG_NAMED and arg_name is not None:
11171117
if arg_name not in all_valid_kwargs:
11181118
unexpected_kwargs.append((arg_name, arg_types[i]))
1119-
1119+
11201120
if unexpected_kwargs:
11211121
for kwarg_name, kwarg_type in unexpected_kwargs:
11221122
matching_type_args: list[str] = []
@@ -1137,25 +1137,25 @@ def no_variant_matches_arguments(
11371137
not_matching_type_args.append(formal_name)
11381138
if has_type_match and matching_variant is None:
11391139
matching_variant = item
1140-
1140+
11411141
matches = best_matches(kwarg_name, matching_type_args, n=3)
11421142
if not matches:
11431143
matches = best_matches(kwarg_name, not_matching_type_args, n=3)
1144-
1144+
11451145
msg = f'Unexpected keyword argument "{kwarg_name}"' + for_func
1146-
1146+
11471147
if matching_variant is not None and matching_variant.definition is not None:
11481148
defn = matching_variant.definition
11491149
if isinstance(defn, Decorator):
11501150
func_line = defn.func.line
11511151
else:
11521152
func_line = defn.line
11531153
msg += f" defined on line {func_line}"
1154-
1155-
if matches:
1154+
1155+
if matches:
11561156
msg += f"; did you mean {pretty_seq(matches, 'or')}?"
11571157
self.fail(msg, context, code=code)
1158-
1158+
11591159
if matching_variant is None:
11601160
self.note(
11611161
f"Possible overload variant{plural_s(len(overload.items))}:",
@@ -1165,8 +1165,8 @@ def no_variant_matches_arguments(
11651165
for item in overload.items:
11661166
self.note(pretty_callable(item, self.options), context, offset=4, code=code)
11671167

1168-
return
1169-
1168+
return
1169+
11701170
arg_types_str = ", ".join(format_type(arg, self.options) for arg in arg_types)
11711171
num_args = len(arg_types)
11721172
if num_args == 0:

0 commit comments

Comments
 (0)