def source_strings_to_files(self, sources: T.List['SourceInputs'], strict: bool=True) -> T.List['SourceOutputs']:
    'Lower inputs to a list of Targets and Files, replacing any strings.\n\n        :param sources: A raw (Meson DSL) list of inputs (targets, files, and\n            strings)\n        :raises InterpreterException: if any of the inputs are of an invalid type\n        :return: A list of Targets and Files\n        '
    mesonlib.check_direntry_issues(sources)
    if (not isinstance(sources, list)):
        sources = [sources]
    results: T.List['SourceOutputs'] = []
    for s in sources:
        if isinstance(s, str):
            if ((not strict) and s.startswith(self.environment.get_build_dir())):
                results.append(s)
                mlog.warning(f'Source item {s!r} cannot be converted to File object, because it is a generated file. This will become a hard error in the future.', location=self.current_node)
            else:
                self.validate_within_subproject(self.subdir, s)
                results.append(mesonlib.File.from_source_file(self.environment.source_dir, self.subdir, s))
        elif isinstance(s, mesonlib.File):
            results.append(s)
        elif isinstance(s, (build.GeneratedList, build.BuildTarget, build.CustomTargetIndex, build.CustomTarget, build.ExtractedObjects, build.StructuredSources)):
            results.append(s)
        else:
            raise InterpreterException(f'Source item is {s!r} instead of string or File-type object')
    return results
Lower inputs to a list of Targets and Files, replacing any strings.

:param sources: A raw (Meson DSL) list of inputs (targets, files, and
    strings)
:raises InterpreterException: if any of the inputs are of an invalid type
:return: A list of Targets and Files
def source_strings_to_files(self, sources: T.List['SourceInputs'], strict: bool=True) -> T.List['SourceOutputs']:
    'Lower inputs to a list of Targets and Files, replacing any strings.\n\n        :param sources: A raw (Meson DSL) list of inputs (targets, files, and\n            strings)\n        :raises InterpreterException: if any of the inputs are of an invalid type\n        :return: A list of Targets and Files\n        '
    mesonlib.check_direntry_issues(sources)
    if (not isinstance(sources, list)):
        sources = [sources]
    results: T.List['SourceOutputs'] = []
    for s in sources:
        if isinstance(s, str):
            if ((not strict) and s.startswith(self.environment.get_build_dir())):
                results.append(s)
                mlog.warning(f'Source item {s!r} cannot be converted to File object, because it is a generated file. This will become a hard error in the future.', location=self.current_node)
            else:
                self.validate_within_subproject(self.subdir, s)
                results.append(mesonlib.File.from_source_file(self.environment.source_dir, self.subdir, s))
        elif isinstance(s, mesonlib.File):
            results.append(s)
        elif isinstance(s, (build.GeneratedList, build.BuildTarget, build.CustomTargetIndex, build.CustomTarget, build.ExtractedObjects, build.StructuredSources)):
            results.append(s)
        else:
            raise InterpreterException(f'Source item is {s!r} instead of string or File-type object')
    return results