basedmypy icon indicating copy to clipboard operation
basedmypy copied to clipboard

Categorize some messages as warnings

Open KotlinIsland opened this issue 2 years ago • 0 comments

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

KotlinIsland avatar May 29 '23 09:05 KotlinIsland