basedmypy
basedmypy copied to clipboard
A `--baseline-report` command (also a report for normal invokations)
From #117 and #185 and others
To provide an overview and insight into the current state of the baseline.
Here is a mockup of what information it could contain:
> mypy --baseline-report
test.py:1:1: error: sus type error [😳]
test.py:2:1: error: sus type error [dynamic]
test.py:3:1: error: sus type error [misc]
test.py:4:1: error: sus type error [misc]
asdf.py:1:1: error: sus type error [😳]
asdf.py:2:1: error: sus type error [dynamic]
asdf.py:3:1: error: sus type error [misc]
asdf.py:4:1: error: sus type error [misc]
8 errors in 2 files
File Summary:
test.py: 4 errors
asdf.py: 4 errors
Error Breakdown:
😳: 2
dynamic: 2
misc: 4
Currently Adopting:
disallow_any_expr
disallow_untyped_defs
relates to #95
why restrict this feature to the baseline file? it would be nice to have in the normal output as well
This is especially relevant now that baseline doesn't store line numbers
Should this be divided up, so they can be selected separately (eg. in projects where there are thousands of errors, spread across lots of modules in different packages)?
- the individual baselined errors
- the "File Summary" (listing individual modules / files, potentially with a depth limit for large projects)
- the "Error Breakdown"
- the "Currently Adopting"
There could be one switch to turn them all on, but would be useful to be able to turn each on / off individually.