diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2020-02-05 09:16:11 -0800 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2020-02-05 09:16:11 -0800 |
commit | f3773fa5c6e63ec8e1984b6afe40a824fb02cbaa (patch) | |
tree | ec07768410d6573fafb303d67ed6eb2b51c25073 | |
parent | 68842f535f2f45f6ba3831b646e1b33a89191ce2 (diff) | |
download | meson-f3773fa5c6e63ec8e1984b6afe40a824fb02cbaa.zip meson-f3773fa5c6e63ec8e1984b6afe40a824fb02cbaa.tar.gz meson-f3773fa5c6e63ec8e1984b6afe40a824fb02cbaa.tar.bz2 |
dependencies/ui: Add type annotations to WxDependency
-rw-r--r-- | mesonbuild/dependencies/ui.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py index 1258c7a..35bbcd5 100644 --- a/mesonbuild/dependencies/ui.py +++ b/mesonbuild/dependencies/ui.py @@ -32,6 +32,9 @@ from .base import ExternalDependency, NonExistingExternalProgram from .base import ExtraFrameworkDependency, PkgConfigDependency from .base import ConfigToolDependency, DependencyFactory +if T.TYPE_CHECKING: + from ..environment import Environment + class GLDependencySystem(ExternalDependency): def __init__(self, name: str, environment, kwargs): @@ -530,7 +533,7 @@ class WxDependency(ConfigToolDependency): tools = ['wx-config-3.0', 'wx-config', 'wx-config-gtk3'] tool_name = 'wx-config' - def __init__(self, environment, kwargs): + def __init__(self, environment: 'Environment', kwargs: T.Dict[str, T.Any]): super().__init__('WxWidgets', environment, kwargs, language='cpp') if not self.is_found: return @@ -540,7 +543,8 @@ class WxDependency(ConfigToolDependency): self.compile_args = self.get_config_value(['--cxxflags'] + self.requested_modules, 'compile_args') self.link_args = self.get_config_value(['--libs'] + self.requested_modules, 'link_args') - def get_requested(self, kwargs): + @staticmethod + def get_requested(kwargs: T.Dict[str, T.Any]) -> T.List[str]: if 'modules' not in kwargs: return [] candidates = extract_as_list(kwargs, 'modules') |