MCPcopy Index your code
hub / github.com/pywebio/PyWebIO / pop_scope

Method pop_scope

pywebio/session/base.py:80–89  ·  view source on GitHub ↗

弹出当前scope :return: 当前scope名

(self)

Source from the content-addressed store, hash-verified

78 raise ValueError("Scope not found")
79
80 def pop_scope(self):
81 """弹出当前scope
82
83 :return: 当前scope名
84 """
85 task_id = type(self).get_current_task_id()
86 try:
87 return self.scope_stack[task_id].pop()
88 except IndexError:
89 raise ValueError("ROOT Scope can't pop") from None
90
91 def push_scope(self, name):
92 """进入新scope"""

Callers 2

__exit__Method · 0.80
__exit__Method · 0.80

Calls 1

get_current_task_idMethod · 0.45

Tested by

no test coverage detected