File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed
Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 2727 job-name : " python-{0} {1}"
2828 run-cmd : " hatch test"
2929 runs-on : ' ["ubuntu-latest", "macos-latest", "windows-latest"]'
30- python-version : ' ["3.10 ", "3.11 ", "3.12 ", "3.13 "]'
30+ python-version : ' ["3.11 ", "3.12 ", "3.13 ", "3.14 "]'
3131 test-documentation :
3232 # Temporarily disabled while we transition from Sphinx to MkDocs
3333 # https://github.com/reactive-python/reactpy/pull/1052
Original file line number Diff line number Diff line change 11from __future__ import annotations
22
3- import asyncio
43import dis
4+ import inspect
55from collections .abc import Callable , Sequence
66from typing import Any , Literal , cast , overload
77
@@ -160,7 +160,7 @@ def to_event_handler_function(
160160 Whether to pass the event parameters a positional args or as a list.
161161 """
162162 if positional_args :
163- if asyncio .iscoroutinefunction (function ):
163+ if inspect .iscoroutinefunction (function ):
164164
165165 async def wrapper (data : Sequence [Any ]) -> None :
166166 await function (* data )
@@ -174,7 +174,7 @@ async def wrapper(data: Sequence[Any]) -> None:
174174
175175 cast (Any , wrapper ).__wrapped__ = function
176176 return wrapper
177- elif not asyncio .iscoroutinefunction (function ):
177+ elif not inspect .iscoroutinefunction (function ):
178178
179179 async def wrapper (data : Sequence [Any ]) -> None :
180180 function (data )
Original file line number Diff line number Diff line change 22
33import asyncio
44import contextlib
5+ import inspect
56from collections .abc import Callable , Coroutine , Sequence
67from logging import getLogger
78from types import FunctionType
@@ -144,7 +145,7 @@ def use_effect(
144145 Returns:
145146 If not function is provided, a decorator. Otherwise ``None``.
146147 """
147- if asyncio .iscoroutinefunction (function ):
148+ if inspect .iscoroutinefunction (function ):
148149 raise TypeError (
149150 "`use_effect` does not support async functions. "
150151 "Use `use_async_effect` instead."
You can’t perform that action at this time.
0 commit comments