mypy icon indicating copy to clipboard operation
mypy copied to clipboard

Shorter reporting (i.e. don't highlight entire functions for certain errors)

Open shaperilio opened this issue 3 months ago • 1 comments

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.

shaperilio avatar May 01 '24 14:05 shaperilio

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

github-actions[bot] avatar May 01 '24 14:05 github-actions[bot]