Skip to content

Commit ef0f5b7

Browse files
committed
Fix casting.
1 parent 277c5dc commit ef0f5b7

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

src/py/kaleido/kaleido.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -405,15 +405,11 @@ async def _temp_generator():
405405
"topojson": topojson,
406406
}
407407

408-
return cast(
409-
"bytes",
410-
(
411-
await self.write_fig_from_object(
412-
generator=_temp_generator(),
413-
cancel_on_error=True,
414-
_write=False,
415-
)
416-
)[0],
408+
res = await self.write_fig_from_object(
409+
generator=_temp_generator(),
410+
cancel_on_error=True,
411+
_write=False,
417412
)
413+
return cast("bytes", res[0])
418414
# Complex type mechanics. Exceptions will raise. None not possible.
419415
# Bytes only option

0 commit comments

Comments
 (0)