yield transformed lines always strings, never None transform: the current transform outs: an iterable of previously transformed inputs. Each may be multiline, which will be passed one line at a time to tr
(transform, outs)
| 617 | |
| 618 | def flush_transformers(self): |
| 619 | def _flush(transform, outs): |
| 620 | """yield transformed lines |
| 621 | |
| 622 | always strings, never None |
| 623 | |
| 624 | transform: the current transform |
| 625 | outs: an iterable of previously transformed inputs. |
| 626 | Each may be multiline, which will be passed |
| 627 | one line at a time to transform. |
| 628 | """ |
| 629 | for out in outs: |
| 630 | for line in out.splitlines(): |
| 631 | # push one line at a time |
| 632 | tmp = transform.push(line) |
| 633 | if tmp is not None: |
| 634 | yield tmp |
| 635 | |
| 636 | # reset the transform |
| 637 | tmp = transform.reset() |
| 638 | if tmp is not None: |
| 639 | yield tmp |
| 640 | |
| 641 | out = [] |
| 642 | for t in self.transforms_in_use: |