Revert "Add interactive edit mode with floating popup"
This reverts commit 99f07aef82.
This commit is contained in:
parent
99f07aef82
commit
e5d709a393
10 changed files with 46 additions and 1045 deletions
|
|
@ -19,7 +19,6 @@ class ConfigTests(unittest.TestCase):
|
|||
cfg = load(str(missing))
|
||||
|
||||
self.assertEqual(cfg.daemon.hotkey, "Cmd+m")
|
||||
self.assertEqual(cfg.daemon.edit_hotkey, "Cmd+Shift+m")
|
||||
self.assertEqual(cfg.recording.input, "")
|
||||
self.assertEqual(cfg.stt.model, "base")
|
||||
self.assertEqual(cfg.stt.device, "cpu")
|
||||
|
|
@ -34,7 +33,7 @@ class ConfigTests(unittest.TestCase):
|
|||
|
||||
def test_loads_nested_config(self):
|
||||
payload = {
|
||||
"daemon": {"hotkey": "Ctrl+space", "edit_hotkey": "Ctrl+Shift+space"},
|
||||
"daemon": {"hotkey": "Ctrl+space"},
|
||||
"recording": {"input": 3},
|
||||
"stt": {"model": "small", "device": "cuda"},
|
||||
"injection": {
|
||||
|
|
@ -56,7 +55,6 @@ class ConfigTests(unittest.TestCase):
|
|||
cfg = load(str(path))
|
||||
|
||||
self.assertEqual(cfg.daemon.hotkey, "Ctrl+space")
|
||||
self.assertEqual(cfg.daemon.edit_hotkey, "Ctrl+Shift+space")
|
||||
self.assertEqual(cfg.recording.input, 3)
|
||||
self.assertEqual(cfg.stt.model, "small")
|
||||
self.assertEqual(cfg.stt.device, "cuda")
|
||||
|
|
@ -68,7 +66,7 @@ class ConfigTests(unittest.TestCase):
|
|||
self.assertEqual(cfg.vocabulary.terms, ["Systemd", "Kubernetes"])
|
||||
|
||||
def test_super_modifier_hotkey_is_valid(self):
|
||||
payload = {"daemon": {"hotkey": "Super+m", "edit_hotkey": "Super+Shift+m"}}
|
||||
payload = {"daemon": {"hotkey": "Super+m"}}
|
||||
with tempfile.TemporaryDirectory() as td:
|
||||
path = Path(td) / "config.json"
|
||||
path.write_text(json.dumps(payload), encoding="utf-8")
|
||||
|
|
@ -76,7 +74,6 @@ class ConfigTests(unittest.TestCase):
|
|||
cfg = load(str(path))
|
||||
|
||||
self.assertEqual(cfg.daemon.hotkey, "Super+m")
|
||||
self.assertEqual(cfg.daemon.edit_hotkey, "Super+Shift+m")
|
||||
|
||||
def test_invalid_hotkey_missing_key_raises(self):
|
||||
payload = {"daemon": {"hotkey": "Ctrl+Alt"}}
|
||||
|
|
@ -98,24 +95,6 @@ class ConfigTests(unittest.TestCase):
|
|||
):
|
||||
load(str(path))
|
||||
|
||||
def test_invalid_edit_hotkey_raises(self):
|
||||
payload = {"daemon": {"edit_hotkey": "Ctrl+Alt"}}
|
||||
with tempfile.TemporaryDirectory() as td:
|
||||
path = Path(td) / "config.json"
|
||||
path.write_text(json.dumps(payload), encoding="utf-8")
|
||||
|
||||
with self.assertRaisesRegex(ValueError, "daemon.edit_hotkey is invalid: missing key"):
|
||||
load(str(path))
|
||||
|
||||
def test_equal_hotkeys_raise(self):
|
||||
payload = {"daemon": {"hotkey": "Cmd+m", "edit_hotkey": "Cmd+m"}}
|
||||
with tempfile.TemporaryDirectory() as td:
|
||||
path = Path(td) / "config.json"
|
||||
path.write_text(json.dumps(payload), encoding="utf-8")
|
||||
|
||||
with self.assertRaisesRegex(ValueError, "must be different"):
|
||||
load(str(path))
|
||||
|
||||
def test_invalid_injection_backend_raises(self):
|
||||
payload = {"injection": {"backend": "invalid"}}
|
||||
with tempfile.TemporaryDirectory() as td:
|
||||
|
|
@ -147,7 +126,6 @@ class ConfigTests(unittest.TestCase):
|
|||
cfg = load(str(path))
|
||||
|
||||
self.assertEqual(cfg.daemon.hotkey, "Cmd+m")
|
||||
self.assertEqual(cfg.daemon.edit_hotkey, "Cmd+Shift+m")
|
||||
self.assertEqual(cfg.injection.backend, "clipboard")
|
||||
|
||||
def test_conflicting_replacements_raise(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue