|
|
|
@ -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, |
|
|
|
|