ruff: replace asserts outside of tests with Exceptions

This commit is contained in:
Jörg Thalheim
2025-08-20 15:45:49 +02:00
parent 5be9b8383b
commit dc5485d9f1
23 changed files with 257 additions and 91 deletions

View File

@@ -99,7 +99,9 @@ class Webview:
"""Get the bridge, creating it if necessary."""
if self._bridge is None:
self.create_bridge()
assert self._bridge is not None, "Bridge should be created"
if self._bridge is None:
msg = "Bridge should be created"
raise RuntimeError(msg)
return self._bridge
def api_wrapper(