MCPcopy
hub / github.com/nonebot/nonebot2 / exit

Method exit

nonebot/drivers/none.py:150–159  ·  view source on GitHub ↗

退出 none driver 参数: force: 强制退出

(self, force: bool = False)

Source from the content-addressed store, hash-verified

148 tg.cancel_scope.cancel()
149
150 def exit(self, force: bool = False):
151 """退出 none driver
152
153 参数:
154 force: 强制退出
155 """
156 if not self.should_exit.is_set():
157 self.should_exit.set()
158 if force:
159 self.force_exit.set()

Callers 2

_handle_signalsMethod · 0.95
_handle_legacy_signalMethod · 0.95

Calls 1

setMethod · 0.80

Tested by

no test coverage detected