MCPcopy Index your code
hub / github.com/bpython/bpython / toggle_file_watch

Method toggle_file_watch

bpython/curtsiesfrontend/repl.py:1151–1169  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1149 )
1150
1151 def toggle_file_watch(self):
1152 if self.watcher:
1153 if self.watching_files:
1154 msg = _("Auto-reloading deactivated.")
1155 self.status_bar.message(msg)
1156 self.watcher.deactivate()
1157 self.watching_files = False
1158 else:
1159 msg = _("Auto-reloading active, watching for file changes...")
1160 self.status_bar.message(msg)
1161 self.watching_files = True
1162 self.watcher.activate()
1163 else:
1164 self.status_bar.message(
1165 _(
1166 "Auto-reloading not available because "
1167 "watchdog not installed."
1168 )
1169 )
1170
1171 # Handler Helpers
1172 def add_normal_character(self, char, narrow_search=True):

Callers 1

process_key_eventMethod · 0.95

Calls 4

_Function · 0.90
deactivateMethod · 0.80
activateMethod · 0.80
messageMethod · 0.45

Tested by

no test coverage detected