Commit Graph

1 Commits

Author SHA1 Message Date
Olivier Gayot 3d1ea39e20 scripts: add script to run mypy and compare with output in another revision
The script can be invoked in different ways:

Run mypy in the current working directory and display the output:

 $ scripts/run-mypy.py

Run mypy in a clean copy of the HEAD revision:

 $ scripts/run-mypy.py --checkout-head

Run mypy in the current working directory and compare the result with
another revision (here main):

 $ scripts/run-mypy.py --diff-against main

Run mypy in a clean copy of the HEAD revision and compare with another
revision (here main):

 $ scripts/run-mypy.py --diff-against main --checkout-head

The produced result might be slightly different from what the CI does
because it also clones checks out curtin and probert (at the right
revision). This is something we might want to do in the CI as well.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-06-01 09:24:05 +02:00