MCPcopy
hub / github.com/pallets/werkzeug / push

Method push

src/werkzeug/local.py:140–145  ·  view source on GitHub ↗

Add a new item to the top of the stack.

(self, obj: T)

Source from the content-addressed store, hash-verified

138 self._storage.set([])
139
140 def push(self, obj: T) -> list[T]:
141 """Add a new item to the top of the stack."""
142 stack = self._storage.get([]).copy()
143 stack.append(obj)
144 self._storage.set(stack)
145 return stack
146
147 def pop(self) -> T | None:
148 """Remove the top item from the stack and return it. If the

Callers 5

test_local_releaseFunction · 0.95
test_local_stackFunction · 0.95
test_local_stack_asyncioFunction · 0.95
test_proxy_fallbackFunction · 0.95
taskFunction · 0.45

Calls 4

appendMethod · 0.80
copyMethod · 0.45
getMethod · 0.45
setMethod · 0.45

Tested by 5

test_local_releaseFunction · 0.76
test_local_stackFunction · 0.76
test_local_stack_asyncioFunction · 0.76
test_proxy_fallbackFunction · 0.76
taskFunction · 0.36