MCPcopy Index your code
hub / github.com/python/cpython / toggle

Method toggle

Lib/profiling/sampling/live_collector/trend_tracker.py:52–60  ·  view source on GitHub ↗

Toggle trend tracking on/off. Returns: New enabled state

(self)

Source from the content-addressed store, hash-verified

50 return self._enabled
51
52 def toggle(self) -> bool:
53 """
54 Toggle trend tracking on/off.
55
56 Returns:
57 New enabled state
58 """
59 self._enabled = not self._enabled
60 return self._enabled
61
62 def set_enabled(self, enabled: bool) -> None:
63 """Set trend tracking enabled state."""

Callers 7

test_toggle_enabledMethod · 0.95
toggleSpecViewFunction · 0.45
toggleAllBytecodeFunction · 0.45
_handle_inputMethod · 0.45
toggleSidebarFunction · 0.45
toggleSectionFunction · 0.45
performSearchFunction · 0.45

Calls

no outgoing calls

Tested by 1

test_toggle_enabledMethod · 0.76