@@ -44,17 +44,17 @@ Identifiers are integers in the range 0 to 5 inclusive.
4444Registering and using tools
4545'''''''''''''''''''''''''''
4646
47- .. function :: use_tool_id(tool_id: int, name: str) -> None
47+ .. function :: use_tool_id(tool_id: int, name: str, / ) -> None
4848
4949 Must be called before *tool_id * can be used.
5050 *tool_id * must be in the range 0 to 5 inclusive.
5151 Raises a :exc: `ValueError ` if *tool_id * is in use.
5252
53- .. function :: free_tool_id(tool_id: int) -> None
53+ .. function :: free_tool_id(tool_id: int, / ) -> None
5454
5555 Should be called once a tool no longer requires *tool_id *.
5656
57- .. function :: get_tool(tool_id: int) -> str | None
57+ .. function :: get_tool(tool_id: int, / ) -> str | None
5858
5959 Returns the name of the tool if *tool_id * is in use,
6060 otherwise it returns ``None ``.
@@ -237,11 +237,11 @@ Setting events globally
237237
238238Events can be controlled globally by modifying the set of events being monitored.
239239
240- .. function :: get_events(tool_id: int) -> int
240+ .. function :: get_events(tool_id: int, / ) -> int
241241
242242 Returns the ``int `` representing all the active events.
243243
244- .. function :: set_events(tool_id: int, event_set: int)
244+ .. function :: set_events(tool_id: int, event_set: int, /) -> None
245245
246246 Activates all events which are set in *event_set *.
247247 Raises a :exc: `ValueError ` if *tool_id * is not in use.
@@ -253,11 +253,11 @@ Per code object events
253253
254254Events can also be controlled on a per code object basis.
255255
256- .. function :: get_local_events(tool_id: int, code: CodeType) -> int
256+ .. function :: get_local_events(tool_id: int, code: CodeType, / ) -> int
257257
258258 Returns all the local events for *code *
259259
260- .. function :: set_local_events(tool_id: int, code: CodeType, event_set: int)
260+ .. function :: set_local_events(tool_id: int, code: CodeType, event_set: int, /) -> None
261261
262262 Activates all the local events for *code * which are set in *event_set *.
263263 Raises a :exc: `ValueError ` if *tool_id * is not in use.
@@ -284,6 +284,11 @@ performance monitoring. For example, a program can be run under a
284284debugger with no overhead if the debugger disables all monitoring
285285except for a few breakpoints.
286286
287+ .. function :: restart_events() -> None
288+
289+ Enable all the events that were disabled by :data: `sys.monitoring.DISABLE `
290+ for all tools.
291+
287292
288293.. _callbacks :
289294
@@ -292,7 +297,7 @@ Registering callback functions
292297
293298To register a callable for events call
294299
295- .. function :: register_callback(tool_id: int, event: int, func: Callable | None) -> Callable | None
300+ .. function :: register_callback(tool_id: int, event: int, func: Callable | None, / ) -> Callable | None
296301
297302 Registers the callable *func * for the *event * with the given *tool_id *
298303
0 commit comments