Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
timtmok committed Apr 10, 2024
1 parent bd8e434 commit c56791f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"jpeg": "image/jpeg",
}


class PositronDisplayPublisherHook:
def __init__(self, target_name: str):
self.comms: Dict[str, PositronComm] = {}
Expand Down Expand Up @@ -104,7 +105,9 @@ def handle_msg(self, msg: CommMessage[PlotBackendMessageContent], raw_msg: JsonR
format = request.params.format or "png"

if width_px != 0 and height_px != 0:
format_dict = self._resize_pickled_figure(pickled, width_px, height_px, pixel_ratio, [format])
format_dict = self._resize_pickled_figure(
pickled, width_px, height_px, pixel_ratio, [format]
)
mime_type = MIME_TYPE[format]
data = format_dict[mime_type]
output = PlotResult(data=data, mime_type=mime_type).dict()
Expand Down

0 comments on commit c56791f

Please sign in to comment.