Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions shiny/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ def _step(fut: Optional["asyncio.Future[None]"] = None):
assert fut.done()
try:
fut.result()
except BaseException as e:
except BaseException as e: # noqa: B036
exc = e

if result_future.cancelled():
Expand All @@ -419,7 +419,7 @@ def _step(fut: Optional["asyncio.Future[None]"] = None):
except (KeyboardInterrupt, SystemExit) as e:
result_future.set_exception(e)
raise
except BaseException as e:
except BaseException as e: # noqa: B036
result_future.set_exception(e)
else:
# If we get here, the coro didn't finish. Schedule it for completion.
Expand Down
4 changes: 3 additions & 1 deletion shiny/render/renderer/_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,9 @@ class AsyncValueFn(Generic[IT]):

def __init__(self, fn: Callable[[], IT] | Callable[[], Awaitable[IT]]):
if isinstance(fn, AsyncValueFn):
return cast(AsyncValueFn[IT], fn)
raise TypeError(
"Must not call `AsyncValueFn.__init__` with an object of class `AsyncValueFn`"
)
self._is_async = is_async_callable(fn)
self._fn = wrap_async(fn)
self._orig_fn = fn
Expand Down