Skip to content

Conversation

@ilevkivskyi
Copy link
Member

Fixes #20353

This makes us respect e.g. --output json for cached files without re-checking the files (which is the desired behavior for users, see issue). This is also a first step towards resolving the "foo defined here" conundrum for parallel checking.

The fix is straightforward. The only question was whether to continue using ErrorTuples or switch to a proper class. I decided to keep the tuples for now to minimize the scope of change.

Note I am also adjusting generic "JSON" fixed-format helpers to natively support tuples (unlike real JSON). We already use tuples in few other places, so it makes sense to just make it "official" (this format is still internal to mypy obviously).

@ilevkivskyi ilevkivskyi requested a review from JukkaL December 8, 2025 01:40
@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2025

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

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.19 regression] output format overruled by .mypy_cache

1 participant