Skip to content

Commit 33c1ecf

Browse files
committed
Change order of types for wrap_async()
Pyright pays attention to the order of Union types; with the old order, sometimes cast() was needed.
1 parent a7cbbf3 commit 33c1ecf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shiny/_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def private_seed():
154154

155155

156156
def wrap_async(
157-
fn: Callable[P, Awaitable[T]] | Callable[P, T]
157+
fn: Callable[P, T] | Callable[P, Awaitable[T]]
158158
) -> Callable[P, Awaitable[T]]:
159159
"""
160160
Given a synchronous function that returns T, return an async function that wraps the

0 commit comments

Comments
 (0)