basedmypy
basedmypy copied to clipboard
Categorize some messages as warnings
It would be beneficial to users using IDE integration(but also makes the cli more readable) to have certain error show as warnings instead of error, this wouldn't have any functional effect, but would improve the DX.
candidates: unreachable, no-any-expr, truthy-bool, redundant-expr, truthy-iterable, ignore-without-code, unused-ignore, redundant-cast, comparison-overlap, no-untyped-call, no-any-return
Also include a --pass-on-warning option such that if there are no errors and only warnings, mypy will return a 0 code.
Also options to rice error levels, two options are:
# reset / extend options:
warning_error_codes = ["operator"] # reset
extend_warning_error_codes = ["operator"] # extend
# full rice (we can't do multiline inline tables yet):
[tool.mypy.error_codes]
warning = ["operator"] # debased
error = ["no-any-expr"] # based