diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2020-09-27 11:21:36 +0200 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2020-09-27 11:21:36 +0200 |
commit | 9f695435e71fb1bc1802288410a2fa1e61139a93 (patch) | |
tree | 543dc3fbc38267d83bc8eae92e46bdd4c38adf5b | |
parent | 19b3f65e70e9fda5562775b813d2d74ed8f0c255 (diff) | |
download | meson-9f695435e71fb1bc1802288410a2fa1e61139a93.zip meson-9f695435e71fb1bc1802288410a2fa1e61139a93.tar.gz meson-9f695435e71fb1bc1802288410a2fa1e61139a93.tar.bz2 |
typing: add convinient option to clear the terminal to run_mypy.py
-rwxr-xr-x | run_mypy.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/run_mypy.py b/run_mypy.py index de8418e..668db82 100755 --- a/run_mypy.py +++ b/run_mypy.py @@ -55,11 +55,16 @@ def main() -> int: parser = argparse.ArgumentParser(description='Process some integers.') parser.add_argument('-p', '--pretty', action='store_true', help='pretty print mypy errors') + parser.add_argument('-C', '--clear', action='store_true', help='clear the terminal before running mypy') opts = parser.parse_args() if opts.pretty: args.append('--pretty') + if opts.clear: + print('\x1bc', end='', flush=True) + + print('Running mypy (this can take some time) ...') p = subprocess.run( [sys.executable, '-m', 'mypy'] + args + modules, cwd=root, |