basedmypy
basedmypy copied to clipboard
Store the line of src an error is on in the baseline
Storing the source code snippet is a really solid way to improve matching, especially on static error messages like no-any-expr.
isn't that what it used to do?
Not the line number, the actual source code on that line.
Would it be possible / a good idea to store the whole statement, in cases of multi-line statements?
I think it would be best to store the AST of the statement, as then you could even avoid formatting alterations.
Is mypy's ast stable across different mypy / python versions?
Could it store the source code, but compare by converting both to AST?