FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Use cache for DictExpr as well by ilevkivskyi · Pull Request #19536 · python/mypy · GitHub

Repository navigation

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
2 changes: 1 addition & 1 deletion mypy/checkexpr.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -6043,7 +6043,7 @@ def accept(
# We cannot use cache inside lambdas, because they skip immediate type
# context, and use enclosing one, see infer_lambda_type_using_context().
# TODO: consider using cache for more expression kinds.
elif isinstance(node, (CallExpr, ListExpr, TupleExpr, OpExpr)) and not (
elif isinstance(node, (CallExpr, ListExpr, TupleExpr, DictExpr, OpExpr)) and not (
self.in_lambda_expr or self.chk.current_node_deferred
):
if (node, type_context) in self.expr_cache:
Expand Down

Back | FazBrowse Home | New Git URL