diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2024-05-19 20:58:46 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-19 20:58:46 +0300 |
commit | 128f0e828e425793203f3112c23cb31f959b4b3e (patch) | |
tree | 2a9677e04e7aa8a9bee8921a3a13a73ffe338b08 /mesonbuild/build.py | |
parent | 77db04ffa6c37496f5a800f2f5cd5a0c19e47d8b (diff) | |
download | meson-128f0e828e425793203f3112c23cb31f959b4b3e.zip meson-128f0e828e425793203f3112c23cb31f959b4b3e.tar.gz meson-128f0e828e425793203f3112c23cb31f959b4b3e.tar.bz2 |
Pass wrapmode value around as a string. (#13229)
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r-- | mesonbuild/build.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index da4c437..d8afd1b 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -46,7 +46,6 @@ if T.TYPE_CHECKING: from .mesonlib import ExecutableSerialisation, FileMode, FileOrString from .modules import ModuleState from .mparser import BaseNode - from .wrap import WrapMode GeneratedTypes = T.Union['CustomTarget', 'CustomTargetIndex', 'GeneratedList'] LibTypes = T.Union['SharedLibrary', 'StaticLibrary', 'CustomTarget', 'CustomTargetIndex'] @@ -662,12 +661,10 @@ class Target(HoldableObject, metaclass=abc.ABCMeta): def get_options(self) -> coredata.OptionsView: return self.options - def get_option(self, key: 'OptionKey') -> T.Union[str, int, bool, 'WrapMode']: - # We don't actually have wrapmode here to do an assert, so just do a - # cast, we know what's in coredata anyway. + def get_option(self, key: 'OptionKey') -> T.Union[str, int, bool]: # TODO: if it's possible to annotate get_option or validate_option_value # in the future we might be able to remove the cast here - return T.cast('T.Union[str, int, bool, WrapMode]', self.options[key].value) + return T.cast('T.Union[str, int, bool]', self.options[key].value) @staticmethod def parse_overrides(kwargs: T.Dict[str, T.Any]) -> T.Dict[OptionKey, str]: |