MCPcopy Index your code
hub / github.com/PDFMathTranslate/PDFMathTranslate / stop_translate_file

Function stop_translate_file

pdf2zh/gui.py:181–195  ·  view source on GitHub ↗

This function stops the translation process. Inputs: - state: The state of the translation process Returns:- None

(state: dict)

Source from the content-addressed store, hash-verified

179
180
181def stop_translate_file(state: dict) -> None:
182 """
183 This function stops the translation process.
184
185 Inputs:
186 - state: The state of the translation process
187
188 Returns:- None
189 """
190 session_id = state["session_id"]
191 if session_id is None:
192 return
193 if session_id in cancellation_event_map:
194 logger.info(f"Stopping translation for session {session_id}")
195 cancellation_event_map[session_id].set()
196
197
198def translate_file(

Callers

nothing calls this directly

Calls 1

setMethod · 0.45

Tested by

no test coverage detected