KotlinIsland / KotlinIsland/basedmypy
Categorize some messages as warnings
- Dominant language
- Python
- Stars
- 202
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
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:
```toml
# 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
```
Contributor guide
Research direction
Start by locating how mypy error codes are classified, reported, and configured through CLI and TOML settings. Trace the listed candidate codes and the proposed warning-related options. Done means warnings are distinguishable from errors, --pass-on-warning returns success when only warnings remain, and warning severity can be configured as described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100