aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/environment.py
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2020-09-01 19:36:21 +0200
committerDaniel Mensinger <daniel@mensinger-ka.de>2020-09-08 20:15:58 +0200
commit47373a2438c0fdeedd229b921c9d7e8dc1fc956a (patch)
tree9488b247f10bb279e0520d028132ce9f106d63c9 /mesonbuild/environment.py
parent23818fc5a389c49e2673f79af2c90d9d56b1aaf0 (diff)
downloadmeson-47373a2438c0fdeedd229b921c9d7e8dc1fc956a.zip
meson-47373a2438c0fdeedd229b921c9d7e8dc1fc956a.tar.gz
meson-47373a2438c0fdeedd229b921c9d7e8dc1fc956a.tar.bz2
typing: get rid of most T.cast
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r--mesonbuild/environment.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index 5cd6069..31d0e81 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -814,9 +814,8 @@ class Environment:
# WARNING: Don't use any values from coredata in __init__. It gets
# re-initialized with project options by the interpreter during
# build file parsing.
- self.coredata = coredata.CoreData(options, self.scratch_dir)
- # Used by the regenchecker script, which runs meson
- self.coredata.meson_command = mesonlib.meson_command
+ # meson_command is used by the regenchecker script, which runs meson
+ self.coredata = coredata.CoreData(options, self.scratch_dir, mesonlib.meson_command)
self.first_invocation = True
def is_cross_build(self, when_building_for: MachineChoice = MachineChoice.HOST) -> bool:
@@ -1038,7 +1037,7 @@ class Environment:
:extra_args: Any additional arguments required (such as a source file)
"""
self.coredata.add_lang_args(comp_class.language, comp_class, for_machine, self)
- extra_args = T.cast(T.List[str], extra_args or [])
+ extra_args = extra_args or []
extra_args += self.coredata.compiler_options[for_machine][comp_class.language]['args'].value
if isinstance(comp_class.LINKER_PREFIX, str):