Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
klamann committed Sep 6, 2024
1 parent c49cda2 commit a227c48
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/raspi_poe_mon/mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

def __exit__(self, type, value, traceback):
if logger.isEnabledFor(logging.DEBUG) and (time.time() - self.last_print) > self.print_delay:
if (
logger.isEnabledFor(logging.DEBUG)
and (time.time() - self.last_print) > self.print_delay
):
ascii_image = image_to_ascii(self.image)
logger.debug(f"rendered image (next log in {self.print_delay}s):\n" + ascii_image)
MockCanvas.last_print = time.time()
Expand Down
2 changes: 1 addition & 1 deletion src/raspi_poe_mon/poe_hat.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from contextlib import contextmanager
from typing import Optional

from PIL.ImageDraw import ImageDraw
from luma.core import render
from luma.core.interface import serial
from luma.oled import device
from PIL.ImageDraw import ImageDraw

from raspi_poe_mon import mock

Expand Down

0 comments on commit a227c48

Please sign in to comment.