mypy
mypy copied to clipboard
Shorter reporting (i.e. don't highlight entire functions for certain errors)
This pertains to #16746, and is a work in progress. Most likely, I'll work into #17006 instead. But since it's been a while, I wanted to have this here to comment on what I learned.
The goal is to avoid highlighting entire functions as the error for things like missing return statement, forgotten self
, etc. I'm not sure we have an exhaustive list of the errors which do this, but perhaps we can find an approach where the entire function is never highlighted as an error.
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅