Skip to content

Commit 5d94871

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent cc375ff commit 5d94871

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

mypy/exprtotype.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def _translate_index_expr(
154154
raise TypeTranslationError()
155155
if base.args:
156156
raise TypeTranslationError()
157-
157+
158158
if isinstance(expr.index, TupleExpr):
159159
args = expr.index.items
160160
else:
@@ -168,7 +168,7 @@ def _translate_index_expr(
168168
# of the Annotation definition and only returning the type information,
169169
# losing all the annotations.
170170
return expr_to_unanalyzed_type(args[0], options, allow_new_syntax, expr)
171-
171+
172172
base.args = tuple(
173173
expr_to_unanalyzed_type(arg, options, allow_new_syntax, expr, allow_unpack=True)
174174
for arg in args
@@ -185,7 +185,7 @@ def _get_base_fullname(
185185
lookup_qualified: Callable[[str, Context], SymbolTableNode | None] | None,
186186
) -> str | None:
187187
"""Get the fullname of a base expression for type translation.
188-
188+
189189
This is used to check if the type is Annotated[...], which needs special handling.
190190
"""
191191
if lookup_qualified is not None and base_name is not None:
@@ -200,7 +200,7 @@ def _translate_union_op(expr: OpExpr, options: Options, allow_new_syntax: bool)
200200
"""Translate a union expression (X | Y) to a type."""
201201
if not ((options.python_version >= (3, 10)) or allow_new_syntax):
202202
raise TypeTranslationError()
203-
203+
204204
return UnionType(
205205
[
206206
expr_to_unanalyzed_type(expr.left, options, allow_new_syntax),
@@ -214,7 +214,7 @@ def _translate_callable_argument(
214214
expr: CallExpr, options: Options, allow_new_syntax: bool
215215
) -> ProperType:
216216
"""Translate a callable argument constructor call to a CallableArgument.
217-
217+
218218
This handles expressions like Arg(int, "x") in callable type syntax.
219219
"""
220220
# Go through the dotted member expr chain to get the full arg
@@ -289,7 +289,7 @@ def _translate_dict_expr(expr: DictExpr, options: Options, allow_new_syntax: boo
289289
"""Translate a dict expression to a TypedDictType."""
290290
if not expr.items:
291291
raise TypeTranslationError()
292-
292+
293293
items: dict[str, Type] = {}
294294
extra_items_from: list[ProperType] = []
295295
for item_name, value in expr.items:
@@ -303,7 +303,7 @@ def _translate_dict_expr(expr: DictExpr, options: Options, allow_new_syntax: boo
303303
)
304304
else:
305305
raise TypeTranslationError()
306-
306+
307307
result = TypedDictType(
308308
items, set(), set(), Instance(MISSING_FALLBACK, ()), expr.line, expr.column
309309
)

0 commit comments

Comments
 (0)