(self, sources: T.List['SourceInputs'], strict: bool = True)
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
Lower inputs to a list of Targets and Files, replacing any strings.
Lower inputs to a list of Targets and Files replacing any strings .
def source_strings_to_files(self, sources: T.List['SourceInputs'], strict: bool = True) -> T.List['SourceOutputs']: # noqa: F811
        """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
        """
        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)):
                results.append(s)
            else:
                raise InterpreterException(f'Source item is {s!r} instead of '
                                           'string or File-type object')
        return results
def source_strings_to_files ( self , sources : T . List [ 'SourceInputs' ] , strict : bool = True ) -> T . List [ 'SourceOutputs' ] : # noqa: F811 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 ) ) : results . append ( s ) else : raise InterpreterException ( f'Source item is {s!r} instead of ' 'string or File-type object' ) return results