Skip to content

Comments

Add flag to reveal simpler types#20854

Open
ilevkivskyi wants to merge 3 commits intopython:masterfrom
ilevkivskyi:simple-reveal
Open

Add flag to reveal simpler types#20854
ilevkivskyi wants to merge 3 commits intopython:masterfrom
ilevkivskyi:simple-reveal

Conversation

@ilevkivskyi
Copy link
Member

Something that always bothered me is that our revealed types are verbose. Sometimes they are painful to visually parse (especially for complex types). Here I propose to add a flag that for more clean/compact revealed types. With just few tweaks a typical length of a revealed type is reduced by ~half.

I know this may sometimes cause ambiguous types, but IMO such situations are very rare. We can polish this if people will like it, and maybe make the default in a distant future.

@ilevkivskyi ilevkivskyi marked this pull request as ready for review February 21, 2026 01:26
@github-actions
Copy link
Contributor

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 participant