8000 Remove type ignore · python/mypy@c22d563 · GitHub
[go: up one dir, main page]

Skip to content

Commit c22d563

Browse files
committed
Remove type ignore
1 parent bc65724 commit c22d563

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

mypy/checkexpr.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from collections import defaultdict
99
from collections.abc import Iterable, Iterator, Sequence
1010
from contextlib import contextmanager
11-
from typing import Callable, ClassVar, Final, Optional, cast, overload
11+
from typing import Any, Callable, ClassVar, Final, Optional, cast, overload
1212
from typing_extensions import TypeAlias as _TypeAlias, assert_never
1313

1414
import mypy.checker
@@ -3587,7 +3587,7 @@ def visit_op_expr(self, e: OpExpr) -> Type:
35873587

35883588
def literal_value_from_expr(
35893589
self, expr: Expression, typ: Type
3590-
) -> tuple[list[str | int], str, bool] | None:
3590+
) -> tuple[list[Any], str, bool] | None:
35913591
if isinstance(expr, StrExpr):
35923592
return [expr.value], "builtins.str", False
35933593
if isinstance(expr, IntExpr):
@@ -3632,10 +3632,7 @@ def literal_expression_addition(
36323632
return None
36333633

36343634
values: list[int | str] = sorted(
3635-
{
3636-
val[0] + val[1] # type: ignore[operator]
3637-
for val in itertools.product(lvalue[0], rvalue[0])
3638-
}
3635+
{val[0] + val[1] for val in itertools.product(lvalue[0], rvalue[0])}
36393636
)
36403637
if len(values) == 1:
36413638
return LiteralType(values[0], self.named_type(lvalue[1]))

0 commit comments

Comments
 (0)
0