File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,9 @@ def json_default(obj: object) -> object:
34
34
return b2a_base64 (obj ).decode ("ascii" )
35
35
36
36
if isinstance (obj , Iterable ):
37
- return list (obj )
37
+ return list (
38
+ obj # pyright: ignore[reportUnknownVariableType, reportUnknownArgumentType]
39
+ )
38
40
39
41
if isinstance (obj , numbers .Integral ):
40
42
return int (obj )
Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ def _restore_state():
159
159
IPyWidgetRenderFuncAsync = Callable [[], Awaitable [Widget ]]
160
160
161
161
162
- class IPyWidget (RenderFunction ):
162
+ class IPyWidget (RenderFunction [ Widget , object ] ):
163
163
def __init__ (self , fn : IPyWidgetRenderFunc ) -> None :
164
164
super ().__init__ (fn )
165
165
self ._fn : IPyWidgetRenderFuncAsync = wrap_async (fn )
@@ -175,7 +175,7 @@ async def run(self) -> object:
175
175
return {"model_id" : widget .model_id } # type: ignore
176
176
177
177
178
- class IPyWidgetAsync (IPyWidget , RenderFunctionAsync ):
178
+ class IPyWidgetAsync (IPyWidget , RenderFunctionAsync [ Widget , object ] ):
179
179
def __init__ (self , fn : IPyWidgetRenderFuncAsync ) -> None :
180
180
if not inspect .iscoroutinefunction (fn ):
181
181
raise TypeError ("IPyWidgetAsync requires an async function" )
You can’t perform that action at this time.
0 commit comments