Combine multiple history steps into one. Modifies first step in-place.
(op: Op, *ops: Op)
| 5653 | |
| 5654 | |
| 5655 | def _combine_ops(op: Op, *ops: Op) -> Op: |
| 5656 | """ |
| 5657 | Combine multiple history steps into one. Modifies first step in-place. |
| 5658 | """ |
| 5659 | |
| 5660 | for el in ops: |
| 5661 | |
| 5662 | op._tracked.update(el._tracked) |
| 5663 | op._deleted.extend(el._deleted) |
| 5664 | _combine_hist_dict(op._modified, el._modified) |
| 5665 | _combine_hist_dict(op._generated, el._generated) |
| 5666 | _combine_hist_dict(op._images, el._images) |
| 5667 | _combine_hist_dict(op._first, el._first) |
| 5668 | _combine_hist_dict(op._last, el._last) |
| 5669 | op._first_shape |= el._first_shape |
| 5670 | op._last_shape |= el._last_shape |
| 5671 | |
| 5672 | return op |
| 5673 | |
| 5674 | |
| 5675 | class History: |
no test coverage detected