Skip to content

Commit

Permalink
Lint Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JamiePhonic authored and JamiePhonic committed Oct 15, 2024
1 parent 12ba92c commit 55522c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions aioslimproto/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ async def _send_heartbeat(self) -> None:
replay_gain=heartbeat_id,
)
# Don't render display on first heartbeat.
# Prevents IntegerDivideByZero exception when LED-VU
# Prevents IntegerDivideByZero exception when LED-VU
# enabled on Squeezelite-ESP32 devices without displays
if (self._last_heartbeat > 1) :
await self._render_display()
Expand Down Expand Up @@ -986,7 +986,7 @@ def _process_setd(self, data: bytes) -> None:
# the display resolution we're currently using
self.display_control.width = display_width
# Update the display width

# Trigger an event callback for "PLAYER_DISPLAY_RESOLUTION"
resolution = f"{display_width} x {display_height}"
self.callback(self, EventType.PLAYER_DISPLAY_RESOLUTION, resolution)
Expand Down
4 changes: 1 addition & 3 deletions aioslimproto/display.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ def render(
draw.text((0, 0), text, font=font, fill=255)
return im


class SlimProtoDisplay:
"""Representation of a Slimproto display."""

Expand Down Expand Up @@ -123,15 +122,14 @@ async def clear(self) -> None:
await self._render_display()

async def set_lines(
"""Set lines to display"""
self,
line_one: str = "",
line_two: str = "",
fullscreen: str = "",
) -> None:
"""Set (predefined) text lines on display."""
if self.image.width != self.width:
self.image = Image.new("1", (self.width, 32))
"""Set (predefined) text lines on display."""
if fullscreen:
# clear regular lines when setting fullscreen
self.last_line_one = ""
Expand Down

0 comments on commit 55522c8

Please sign in to comment.