basedmypy icon indicating copy to clipboard operation
basedmypy copied to clipboard

`auto_baseline` should do better

Open KotlinIsland opened this issue 3 years ago • 3 comments

It should be able to update individual files if that file has no errors.

It should respect the config options the baseline was created with, not just the targets.

KotlinIsland avatar Apr 07 '22 01:04 KotlinIsland

It should respect the config options the baseline was created with, not just the targets.

Is that so it doesn't remove errors from the baseline when run with command line switches that reduce strictness?

eg. one time I ran basedmypy with mypy --legacy. It thought that i'd fixed all the errors, and so deleted the baseline.

Zeckie avatar Apr 24 '22 03:04 Zeckie

It should be able to update individual files if that file has no errors.

That could be risky in cases where trialling a change in one file to fix one error results in errors in another file. IDEs often have history / undo for changes they make, but often not for files changed externally.

Zeckie avatar Apr 24 '22 03:04 Zeckie

It should respect the config options the baseline was created with, not just the targets.

Is that so it doesn't remove errors from the baseline when run with command line switches that reduce strictness?

eg. one time I ran basedmypy with mypy --legacy. It thought that i'd fixed all the errors, and so deleted the baseline.

As a workaround just remember to specify --baseline-file= when using different config options, you could set an alias for this:

> alias --save "mypy-legacy" "mypy --legacy --baseline-file="

That would be covered by #118 and #108

KotlinIsland avatar Apr 26 '22 02:04 KotlinIsland