src/airflow_sync/utils.py
def from_tuple(
        cls,
        pipeline: Tuple[
            Union[str, Path],
            Union[str, List[Union[str, "SqlFile"]]],
            List[Union[str, "SqlFile"]],
        ],
    ) -> Tuple["SqlFile", List["SqlFile"], Optional[List["SqlFile"]]]:
        """Creates a :class:`SqlFile` instance from a tuple of file paths.

        :return: A new :class:`SqlFile` and its corresponding triggers and trigger deps
        :rtype: Tuple[`SqlFile`, List[`SqlFile`], Optional[List[`SqlFile`]]]
        """
        path, triggers, deps = pipeline
        trigger_list: List[Union[str, "SqlFile"]] = []
        if triggers and not isinstance(triggers, (list, tuple)):
            trigger_list = [triggers]
        elif triggers:
            trigger_list = list(triggers)
        return cls.create(path=path, triggers=trigger_list, dependencies=deps)
Creates a :class:`SqlFile` instance from a tuple of file paths.

        :return: A new :class:`SqlFile` and its corresponding triggers and trigger deps
        :rtype: Tuple[`SqlFile`, List[`SqlFile`], Optional[List[`SqlFile`]]]
        
Creates a :class:`SqlFile` instance from a tuple of file paths.
Creates a : class : ` SqlFile ` instance from a tuple of file paths .
def from_tuple(
        cls,
        pipeline: Tuple[
            Union[str, Path],
            Union[str, List[Union[str, "SqlFile"]]],
            List[Union[str, "SqlFile"]],
        ],
    ) -> Tuple["SqlFile", List["SqlFile"], Optional[List["SqlFile"]]]:
        path, triggers, deps = pipeline
        trigger_list: List[Union[str, "SqlFile"]] = []
        if triggers and not isinstance(triggers, (list, tuple)):
            trigger_list = [triggers]
        elif triggers:
            trigger_list = list(triggers)
        return cls.create(path=path, triggers=trigger_list, dependencies=deps)
def from_tuple ( cls , pipeline : Tuple [ Union [ str , Path ] , Union [ str , List [ Union [ str , "SqlFile" ] ] ] , List [ Union [ str , "SqlFile" ] ] , ] , ) -> Tuple [ "SqlFile" , List [ "SqlFile" ] , Optional [ List [ "SqlFile" ] ] ] : path , triggers , deps = pipeline trigger_list : List [ Union [ str , "SqlFile" ] ] = [ ] if triggers and not isinstance ( triggers , ( list , tuple ) ) : trigger_list = [ triggers ] elif triggers : trigger_list = list ( triggers ) return cls . create ( path = path , triggers = trigger_list , dependencies = deps )
Creates a :class:`SqlFile` instance from a tuple of file paths.
Creates a : class : ` SqlFile ` instance from a tuple of file paths .
"""Creates a :class:`SqlFile` instance from a tuple of file paths.

        :return: A new :class:`SqlFile` and its corresponding triggers and trigger deps
        :rtype: Tuple[`SqlFile`, List[`SqlFile`], Optional[List[`SqlFile`]]]
        """
A new :class:`SqlFile` and its corresponding triggers and trigger deps
A new : class : ` SqlFile ` and its corresponding triggers and trigger deps
Tuple[`SqlFile`, List[`SqlFile`], Optional[List[`SqlFile`]]]
cls
pipeline
Tuple[
            Union[str, Path],
            Union[str, List[Union[str, "SqlFile"]]],
            List[Union[str, "SqlFile"]],
        ]