Skip to content

Update mypy from <1.18 to <1.21 (support through 1.20.1)#2373

Merged
sobolevn merged 3 commits intomasterfrom
copilot/update-mypy-to-latest-version
Apr 14, 2026
Merged

Update mypy from <1.18 to <1.21 (support through 1.20.1)#2373
sobolevn merged 3 commits intomasterfrom
copilot/update-mypy-to-latest-version

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 14, 2026

  • Investigate CI failures (all 20 jobs fail: pyproject.toml changed significantly since poetry.lock was last generated)
  • Investigate mypy plugin API compatibility for versions 1.19-1.20
  • Bump mypy minimum version from >=1.12 to >=1.19 in pyproject.toml
  • Clean up dead version-check code in plugin (remove < (1, 16) branches since min is now 1.19)
  • Regenerate poetry.lock to match updated pyproject.toml
  • Verify mypy passes on source (115 files) and tests (84 files)
  • All 878 typesafety tests pass
  • All 1089 regular tests pass with 100% coverage
  • Run validation

Copilot AI and others added 2 commits April 13, 2026 23:57
- Update 'Cannot infer type argument N' → 'Cannot infer value of type parameter X'
- Remove no longer emitted '"Never" not callable' error
- Remove no longer emitted 'erased type of self' errors

Agent-Logs-Url: https://github.com/dry-python/returns/sessions/f332ee3a-c556-47ec-a276-8119a6a98aca

Co-authored-by: sobolevn <4660275+sobolevn@users.noreply.github.com>
- Update mypy version constraint from >=1.12,<1.18 to >=1.12,<1.21
- Fix builtins.X → X display changes in all typesafety YAML tests (mypy 1.20)
- Fix TypeVar backtick suffix removal in revealed types (mypy 1.20)
- Fix 'Cannot infer type argument N' → 'Cannot infer value of type parameter X' (mypy 1.18)
- Remove no longer emitted 'Never not callable' and 'erased type of self' errors (mypy 1.18)
- Remove no longer emitted 'defined here' note (mypy 1.20)
- Remove unused type: ignore comment in test_pickle.py (mypy 1.20 improvement)

Agent-Logs-Url: https://github.com/dry-python/returns/sessions/f332ee3a-c556-47ec-a276-8119a6a98aca

Co-authored-by: sobolevn <4660275+sobolevn@users.noreply.github.com>
…n checks

- Bump mypy version constraint from >=1.12,<1.21 to >=1.19,<1.21
- Regenerate poetry.lock to fix CI (lock file was out of sync)
- Remove dead version-check code for mypy < 1.16 in plugin
  (analyze_member_access msg parameter handling no longer needed)
- Remove unused imports (importlib.metadata.version, typing.Any)

Agent-Logs-Url: https://github.com/dry-python/returns/sessions/ec3a5de7-f5a3-49a4-a973-9265d6a4555e

Co-authored-by: sobolevn <4660275+sobolevn@users.noreply.github.com>
Copilot AI requested a review from sobolevn April 14, 2026 06:13
@sobolevn sobolevn marked this pull request as ready for review April 14, 2026 06:26
@sobolevn sobolevn merged commit 3a21661 into master Apr 14, 2026
22 checks passed
@sobolevn sobolevn deleted the copilot/update-mypy-to-latest-version branch April 14, 2026 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants