From a024f432dd1cd406fa80334f63e91939536d3f79 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 14 Jun 2021 15:36:16 -0700 Subject: [PATCH] interpreter: add overload for source_strings_to_files when only passing strings or Files we only get back Files. This is useful for the install_* methods --- mesonbuild/interpreter/interpreter.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py index be17c9a9c..75f55fd3e 100644 --- a/mesonbuild/interpreter/interpreter.py +++ b/mesonbuild/interpreter/interpreter.py @@ -2480,6 +2480,10 @@ Try setting b_lundef to false instead.'''.format(self.coredata.options[OptionKey if project_root / self.subproject_dir in norm.parents: raise InterpreterException(f'Sandbox violation: Tried to grab {inputtype} {norm.name} from a nested subproject.') + + @T.overload + def source_strings_to_files(self, sources: T.List['mesonlib.FileOrString']) -> T.List['mesonlib.File']: ... + def source_strings_to_files(self, sources: T.List['SourceInputs']) -> T.List['SourceOutputs']: """Lower inputs to a list of Targets and Files, replacing any strings.