basedmypy icon indicating copy to clipboard operation
basedmypy copied to clipboard

fail if there's an error in the baseline that's no longer there

Open DetachHead opened this issue 3 years ago • 7 comments

related: #106

DetachHead avatar Dec 17 '21 00:12 DetachHead

related #84

KotlinIsland avatar Dec 21 '21 05:12 KotlinIsland

Like this?

> echo "a: str = 1" > test.py
> mypy --write-baseline test.py
test.py: error: expected str found int
wrote to baseline
> echo "a: str = '1'" > test.py
> mypy test.py
test.py: error: found missing error! please remove the missing error to continue

KotlinIsland avatar Mar 03 '22 23:03 KotlinIsland

yea

DetachHead avatar Mar 04 '22 03:03 DetachHead

Due to auto-baseline covering most of this use case I'm marking this as low.

KotlinIsland avatar Mar 04 '22 05:03 KotlinIsland

This looks to me as though it is asking the user to manually edit the baseline file. Is that what was intended? When would it be needed (or even useful)?

Zeckie avatar Jul 16 '22 04:07 Zeckie

no it's just to make sure the baseline is always up to date. something like this would be good for CI i think

DetachHead avatar Jul 16 '22 05:07 DetachHead

I think it would make sense to use a different return code for this as well, so the CI can tell what has happened without needing to parse the output.

Zeckie avatar Jul 21 '22 09:07 Zeckie