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:
3434 return b2a_base64 (obj ).decode ("ascii" )
3535
3636 if isinstance (obj , Iterable ):
37- return list (obj )
37+ return list (
38+ obj # pyright: ignore[reportUnknownVariableType, reportUnknownArgumentType]
39+ )
3840
3941 if isinstance (obj , numbers .Integral ):
4042 return int (obj )
Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ def _restore_state():
159159IPyWidgetRenderFuncAsync = Callable [[], Awaitable [Widget ]]
160160
161161
162- class IPyWidget (RenderFunction ):
162+ class IPyWidget (RenderFunction [ Widget , object ] ):
163163 def __init__ (self , fn : IPyWidgetRenderFunc ) -> None :
164164 super ().__init__ (fn )
165165 self ._fn : IPyWidgetRenderFuncAsync = wrap_async (fn )
@@ -175,7 +175,7 @@ async def run(self) -> object:
175175 return {"model_id" : widget .model_id } # type: ignore
176176
177177
178- class IPyWidgetAsync (IPyWidget , RenderFunctionAsync ):
178+ class IPyWidgetAsync (IPyWidget , RenderFunctionAsync [ Widget , object ] ):
179179 def __init__ (self , fn : IPyWidgetRenderFuncAsync ) -> None :
180180 if not inspect .iscoroutinefunction (fn ):
181181 raise TypeError ("IPyWidgetAsync requires an async function" )
You can’t perform that action at this time.
0 commit comments