Skip to content

Commit 503aca2

Browse files
committed
Simplify logic in run_ui_poll_loop
1 parent e9ff451 commit 503aca2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

jupyter_ui_poll/_poll.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,6 @@ def as_iterator(
327327

328328
for x in with_ui_events(as_iterator(f, sleep), n):
329329
if x is not None:
330-
break
330+
return x
331331

332-
assert x is not None
333-
return x
332+
raise RuntimeError("hm...") # for mypy sake

0 commit comments

Comments
 (0)