diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2020-09-27 11:15:57 +0200 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2020-09-27 11:20:05 +0200 |
commit | 19b3f65e70e9fda5562775b813d2d74ed8f0c255 (patch) | |
tree | cadd490dfdcd783874467ff41086dd724030149f | |
parent | dff40ca259c396568eeb4d05c534781ca148f8e7 (diff) | |
download | meson-19b3f65e70e9fda5562775b813d2d74ed8f0c255.zip meson-19b3f65e70e9fda5562775b813d2d74ed8f0c255.tar.gz meson-19b3f65e70e9fda5562775b813d2d74ed8f0c255.tar.bz2 |
typing: fix indentation in run_mypy.py
-rwxr-xr-x | run_mypy.py | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/run_mypy.py b/run_mypy.py index db38112..de8418e 100755 --- a/run_mypy.py +++ b/run_mypy.py @@ -7,64 +7,64 @@ from pathlib import Path import typing as T modules = [ - # fully typed submodules - 'mesonbuild/ast', - 'mesonbuild/compilers/mixins', - 'mesonbuild/scripts', - 'mesonbuild/wrap', + # fully typed submodules + 'mesonbuild/ast', + 'mesonbuild/compilers/mixins', + 'mesonbuild/scripts', + 'mesonbuild/wrap', - # specific files - 'mesonbuild/arglist.py', - 'mesonbuild/compilers/compilers.py', - 'mesonbuild/compilers/c_function_attributes.py', - 'mesonbuild/compilers/objc.py', - 'mesonbuild/compilers/objcpp.py', - # 'mesonbuild/coredata.py', - 'mesonbuild/dependencies/boost.py', - 'mesonbuild/dependencies/hdf5.py', - 'mesonbuild/dependencies/mpi.py', - 'mesonbuild/envconfig.py', - 'mesonbuild/interpreterbase.py', - 'mesonbuild/linkers.py', - 'mesonbuild/mcompile.py', - 'mesonbuild/mesonlib.py', - 'mesonbuild/minit.py', - 'mesonbuild/mintro.py', - 'mesonbuild/mlog.py', - 'mesonbuild/modules/fs.py', - 'mesonbuild/mparser.py', - 'mesonbuild/msetup.py', - 'mesonbuild/mtest.py', + # specific files + 'mesonbuild/arglist.py', + 'mesonbuild/compilers/compilers.py', + 'mesonbuild/compilers/c_function_attributes.py', + 'mesonbuild/compilers/objc.py', + 'mesonbuild/compilers/objcpp.py', + # 'mesonbuild/coredata.py', + 'mesonbuild/dependencies/boost.py', + 'mesonbuild/dependencies/hdf5.py', + 'mesonbuild/dependencies/mpi.py', + 'mesonbuild/envconfig.py', + 'mesonbuild/interpreterbase.py', + 'mesonbuild/linkers.py', + 'mesonbuild/mcompile.py', + 'mesonbuild/mesonlib.py', + 'mesonbuild/minit.py', + 'mesonbuild/mintro.py', + 'mesonbuild/mlog.py', + 'mesonbuild/modules/fs.py', + 'mesonbuild/mparser.py', + 'mesonbuild/msetup.py', + 'mesonbuild/mtest.py', - 'run_mypy.py', - 'tools' + 'run_mypy.py', + 'tools' ] def check_mypy() -> None: - try: - import mypy - except ImportError: - print('Failed import mypy') - sys.exit(1) + try: + import mypy + except ImportError: + print('Failed import mypy') + sys.exit(1) def main() -> int: - check_mypy() + check_mypy() - root = Path(__file__).absolute().parent - args = [] # type: T.List[str] + root = Path(__file__).absolute().parent + args = [] # type: T.List[str] - parser = argparse.ArgumentParser(description='Process some integers.') - parser.add_argument('-p', '--pretty', action='store_true', help='pretty print mypy errors') + parser = argparse.ArgumentParser(description='Process some integers.') + parser.add_argument('-p', '--pretty', action='store_true', help='pretty print mypy errors') - opts = parser.parse_args() - if opts.pretty: - args.append('--pretty') + opts = parser.parse_args() + if opts.pretty: + args.append('--pretty') - p = subprocess.run( - [sys.executable, '-m', 'mypy'] + args + modules, - cwd=root, - ) - return p.returncode + p = subprocess.run( + [sys.executable, '-m', 'mypy'] + args + modules, + cwd=root, + ) + return p.returncode if __name__ == '__main__': - sys.exit(main()) + sys.exit(main()) |