Skip to content

Commit 709b878

Browse files
committed
Use cache for OpExpr
1 parent bd94bcb commit 709b878

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypy/checkexpr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5994,7 +5994,7 @@ def accept(
59945994
# We cannot use cache inside lambdas, because they skip immediate type
59955995
# context, and use enclosing one, see infer_lambda_type_using_context().
59965996
# TODO: consider using cache for more expression kinds.
5997-
elif isinstance(node, (CallExpr, ListExpr, TupleExpr)) and not (
5997+
elif isinstance(node, (CallExpr, ListExpr, TupleExpr, OpExpr)) and not (
59985998
self.in_lambda_expr or self.chk.current_node_deferred
59995999
):
60006000
if (node, type_context) in self.expr_cache:

0 commit comments

Comments
 (0)