Skip to content

[CI] Lint with mypy 0.920 - #29

Open
Liquid369 wants to merge 1 commit into
PIVX-Project:masterfrom
Liquid369:2026_mypy_0920
Open

Liquid369 wants to merge 1 commit into
PIVX-Project:masterfrom
Liquid369:2026_mypy_0920

Conversation

@Liquid369

Copy link
Copy Markdown
Member

mypy 0.781 needs typed-ast, which no longer builds on Python 3.10, and it rejects builtin generics (tuple[...]) that #22 introduces.

0.920 no longer bundles typeshed stubs, so types-requests and types-simplejson are pinned exactly. Open ranges resolve today to stubs using positional-only parameter syntax, which 0.920 cannot parse (simplejson-stubs/encoder.pyi:60).

Checked locally on Python 3.10 with flake8 3.8.4: master, #20 and #22 all pass. Land before #22.

0.781 rejects builtin generics (tuple[...]), which PIVX-Project#22 uses, and needs
typed-ast, which no longer builds on 3.10. 0.920 no longer bundles stubs,
so pin them exactly: open ranges pull stubs with positional-only syntax
that 0.920 cannot parse. Master and PIVX-Project#20 pass as-is.
@Liquid369
Liquid369 requested a review from Fuzzbawls October 5, 2026 01:24
@Liquid369

Copy link
Copy Markdown
Member Author

Update on scope: #22 no longer needs this. a731ef2 moved its annotations to
typing.Tuple / Optional, so it passes CI's mypy 0.781 as-is.

Still worth merging on its own: 0.781 depends on typed-ast, which fails to compile
on Python 3.10 with current clang (implicit _PyUnicode_DecodeUnicodeEscape), so it
can't be installed locally on macOS. Linux CI only gets away with it because gcc
treats that as a warning. 0.920 drops typed-ast on 3.8+ and reads builtin generics.

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.

1 participant