flowcraft/generator/process.py
def update_main_forks(self, sink):
        """Updates the forks attribute with the sink channel destination

        Parameters
        ----------
        sink : str
            Channel onto which the main input will be forked to

        """

        if not self.main_forks:
            self.main_forks = [self.output_channel]
            self.output_channel = "_{}".format(self.output_channel)
        self.main_forks.append(sink)

        # fork_lst = self.forks + self.main_forks
        operator = "set" if len(self.main_forks) == 1 else "into"
        self.forks = ["\n{}.{}{{ {} }}\n".format(
            self.output_channel, operator, ";".join(self.main_forks))]

        self._context = {**self._context,
                         **{"forks": "".join(self.forks),
                            "output_channel": self.output_channel}}
def update_main_forks(self, sink):
        if not self.main_forks:
            self.main_forks = [self.output_channel]
            self.output_channel = "_{}".format(self.output_channel)
        self.main_forks.append(sink)

        # fork_lst = self.forks + self.main_forks
        operator = "set" if len(self.main_forks) == 1 else "into"
        self.forks = ["\n{}.{}{{ {} }}\n".format(
            self.output_channel, operator, ";".join(self.main_forks))]

        self._context = {**self._context,
                         **{"forks": "".join(self.forks),
                            "output_channel": self.output_channel}}
def update_main_forks ( self , sink ) : if not self . main_forks : self . main_forks = [ self . output_channel ] self . output_channel = "_{}" . format ( self . output_channel ) self . main_forks . append ( sink ) # fork_lst = self.forks + self.main_forks operator = "set" if len ( self . main_forks ) == 1 else "into" self . forks = [ "\n{}.{}{{ {} }}\n" . format ( self . output_channel , operator , ";" . join ( self . main_forks ) ) ] self . _context = { * * self . _context , * * { "forks" : "" . join ( self . forks ) , "output_channel" : self . output_channel } }
Updates the forks attribute with the sink channel destination

        Parameters
        ----------
        sink : str
            Channel onto which the main input will be forked to
Updates the forks attribute with the sink channel destination