basedmypy
basedmypy copied to clipboard
allowlist/blocklist of error codes/strictness flags for baseline
Would be very based as you would be able to keep track of what strictness options you are currently adopting.
certain error codes are dangerous to baseline because they can cause other errors to go undetected:
def foo(value: str = None) -> None: #baselined "no implicit optional" error
bar: str = value # new code, no error because it's treated as `str` even tho it's actually `str | None`
That error is just assignment which would be suck to ban from baseline
certain error codes are dangerous to baseline because they can cause other errors to go undetected:
def foo(value: str = None) -> None: #baselined "no implicit optional" error bar: str = value # new code, no error because it's treated as `str` even tho it's actually `str | None`
Related: #152
From #195
Would be useful to be able to configure it so when the baseline is being used to supress existing errors only, there is some option to specify which mypy options are new (eg.
disallow_any_explicit = true). With that option, only those errors would be used for baselining (i.e. any errors that would be raised without that option would not be able to be added to the baseline, and would not be suppressed by anything already in the baseline).
Would be very based as you ...
Isn't there an issue for that?