MCPcopy Create free account
hub / github.com/datapane/datapane / fresh_state

Method fresh_state

python-client/src/datapane/view/visitors.py:115–125  ·  view source on GitHub ↗
(self, b: ContainerBlock)

Source from the content-addressed store, hash-verified

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

Callers 1

visitMethod · 0.95

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected