Skip to content

Evaluate argument expressions in runtime evaluation order#20491

Merged
hauntsaninja merged 2 commits into
python:masterfrom
hauntsaninja:walruseval
Jan 14, 2026
Merged

Evaluate argument expressions in runtime evaluation order#20491
hauntsaninja merged 2 commits into
python:masterfrom
hauntsaninja:walruseval

Conversation

@hauntsaninja

@hauntsaninja hauntsaninja commented Dec 30, 2025

Copy link
Copy Markdown
Collaborator

Fixes #20411 , closes #20470

@github-actions

This comment has been minimized.

Comment thread mypy/checkexpr.py Outdated
@github-actions

Copy link
Copy Markdown
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

rotki (https://github.com/rotki/rotki)
+ rotkehlchen/chain/evm/decoding/stakedao/decoder.py:298: error: Unused "type: ignore" comment  [unused-ignore]
+ rotkehlchen/tests/unit/decoders/test_uniswapv3.py:617: error: Unused "type: ignore" comment  [unused-ignore]
+ rotkehlchen/tests/unit/decoders/test_curve.py:2913: error: Unused "type: ignore" comment  [unused-ignore]
+ rotkehlchen/tests/api/test_history_base_entry.py:732: error: Unused "type: ignore" comment  [unused-ignore]

@A5rocks A5rocks left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Supersedes #20470 (and I thought there was 1 other, but I can't find it :/). Makes sense to me, though I think the approach here is slightly harder to wrap my head around than the one in that other PR. But this way is better because we need ctx for self.accept I guess.

@hauntsaninja

hauntsaninja commented Jan 2, 2026

Copy link
Copy Markdown
Collaborator Author

I don't think that PR does anything

@radugheorman

Copy link
Copy Markdown

@hauntsaninja will this be merged into the next release?

@hauntsaninja hauntsaninja merged commit d298d93 into python:master Jan 14, 2026
23 checks passed
@hauntsaninja hauntsaninja deleted the walruseval branch January 14, 2026 02:59
michaelm-openai pushed a commit to michaelm-openai/mypy that referenced this pull request Jan 16, 2026
michaelm-openai pushed a commit to michaelm-openai/mypy that referenced this pull request Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot determine type of walrus operator variable in list comprehension

4 participants