diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2020-08-30 13:26:41 +0200 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2020-09-08 20:15:57 +0200 |
commit | c637b913c94817c81e9a35287b995741a7089413 (patch) | |
tree | 903baf75b3d7e9cd3610e31614f29d1e53433a59 /mesonbuild/msetup.py | |
parent | 6b1b995b32a867614535ba1d1c80844b273fc053 (diff) | |
download | meson-c637b913c94817c81e9a35287b995741a7089413.zip meson-c637b913c94817c81e9a35287b995741a7089413.tar.gz meson-c637b913c94817c81e9a35287b995741a7089413.tar.bz2 |
typing: fully annotate mcompile, minit, and msetup
Diffstat (limited to 'mesonbuild/msetup.py')
-rw-r--r-- | mesonbuild/msetup.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mesonbuild/msetup.py b/mesonbuild/msetup.py index 2521511..f940a58 100644 --- a/mesonbuild/msetup.py +++ b/mesonbuild/msetup.py @@ -31,7 +31,7 @@ from . import mintro from .mconf import make_lower_case from .mesonlib import MesonException -def add_arguments(parser): +def add_arguments(parser: argparse.ArgumentParser) -> None: coredata.register_builtin_arguments(parser) parser.add_argument('--native-file', default=[], @@ -59,7 +59,7 @@ def add_arguments(parser): parser.add_argument('sourcedir', nargs='?', default=None) class MesonApp: - def __init__(self, options): + def __init__(self, options: argparse.Namespace) -> None: (self.source_dir, self.build_dir) = self.validate_dirs(options.builddir, options.sourcedir, options.reconfigure, @@ -150,7 +150,7 @@ class MesonApp: raise SystemExit('Directory does not contain a valid build tree:\n{}'.format(build_dir)) return src_dir, build_dir - def generate(self): + def generate(self) -> None: env = environment.Environment(self.source_dir, self.build_dir, self.options) mlog.initialize(env.get_log_dir(), self.options.fatal_warnings) if self.options.profile: @@ -158,7 +158,7 @@ class MesonApp: with mesonlib.BuildDirLock(self.build_dir): self._generate(env) - def _generate(self, env): + def _generate(self, env: environment.Environment) -> None: mlog.debug('Build started at', datetime.datetime.now().isoformat()) mlog.debug('Main binary:', sys.executable) mlog.debug('Build Options:', coredata.get_cmd_line_options(self.build_dir, self.options)) @@ -239,7 +239,7 @@ class MesonApp: os.unlink(cdf) raise -def run(options) -> int: +def run(options: argparse.Namespace) -> int: coredata.parse_cmd_line_options(options) app = MesonApp(options) app.generate() |