def update_groups(self):
    groups = dict()
    for job in self.needrun_jobs:
        if (job.group is None):
            continue
        stop = (lambda j: (j.group != job.group))
        group = self.group_job_factory.new(job.group, (job for job in self.bfs(self.dependencies, job, stop=stop) if self.needrun(job)))
        for j in group:
            if (j in groups):
                other = groups[j]
                other.merge(group)
                group = other
        for j in group:
            if (j not in groups):
                groups[j] = group
    self._group = groups
    self._update_group_components()
def update_groups(self):
    groups = dict()
    for job in self.needrun_jobs:
        if (job.group is None):
            continue
        stop = (lambda j: (j.group != job.group))
        group = self.group_job_factory.new(job.group, (job for job in self.bfs(self.dependencies, job, stop=stop) if self.needrun(job)))
        for j in group:
            if (j in groups):
                other = groups[j]
                other.merge(group)
                group = other
        for j in group:
            if (j not in groups):
                groups[j] = group
    self._group = groups
    self._update_group_components()