(self, b: ContainerBlock)
| 113 | |
| 114 | @contextmanager |
| 115 | def fresh_state(self, b: ContainerBlock) -> None: |
| 116 | x = self.current_state |
| 117 | self.current_state = [] |
| 118 | |
| 119 | yield None |
| 120 | |
| 121 | # build a new instance of the container block |
| 122 | b1 = copy(b) |
| 123 | b1.blocks = self.current_state |
| 124 | x.append(b1) |
| 125 | self.current_state = x |