Skip to content

Mypy 21 fixes - #12651

Merged
glyph merged 5 commits into
trunkfrom
mypy-21-fixes
May 22, 2026
Merged

glyph merged 5 commits into
trunkfrom
mypy-21-fixes

Conversation

@glyph

@glyph glyph commented May 21, 2026 •

Copy link
Copy Markdown
Member

Scope and purpose

Fixes #12652

This adjusts the versions of Mypy and a bunch of older annotations.

@codspeed

codspeed Bot commented May 21, 2026 •

Copy link
Copy Markdown

Merging this PR will improve performance by 4.44%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

#### 🎉 Hooray! `pytest-codspeed` just leveled up to 5.0.2!

A heads-up, this is a breaking change and it might affect your current performance baseline a bit. But here's the exciting part - it's packed with new, cool features and promises improved result stability 🥳!
Curious about what's new? Visit our releases page to delve into all the awesome details about this new version.

⚡ 5 improved benchmarks
✅ 31 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
⚡ test_deferred_callback_chain_fires_at_end 59.4 µs 55.9 µs +6.29%
⚡ test_deferred_callback_chain_fires_at_start 67 µs 63.6 µs +5.29%
⚡ test_deferred_chained_already_fired 73.2 µs 70.1 µs +4.4%
⚡ test_deferred_chained_not_fired 97.5 µs 94.3 µs +3.43%
⚡ test_deferred_errback_chain 115.1 µs 111.9 µs +2.84%

Tip

Curious why this is faster? Use the CodSpeed MCP and ask your agent.


Comparing mypy-21-fixes (beefe35) with trunk (75facb2)

Open in CodSpeed

@glyph
glyph marked this pull request as ready for review May 22, 2026 03:15
@chevah-robot
chevah-robot requested a review from a team May 22, 2026 03:15
@adiroiban

Copy link
Copy Markdown
Member

Just for the record...

I am running this on my local computer on a venv in which I have executed pip install -e .[mypy]

All ok on Python 3.11


I am am trying with python 3.14... I have created a separate task for 3.14 #12653

@adiroiban adiroiban left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks. Changes looks good.

Can I ask a review for #12643 ?

Thanks!

@glyph
glyph merged commit 28c4003 into trunk May 22, 2026
28 checks passed
@glyph
glyph deleted the mypy-21-fixes branch May 22, 2026 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

upgrade to Mypy 2.1

3 participants