From 15b40a69058adfc3aafd8e9c8bb79119716732e6 Mon Sep 17 00:00:00 2001 From: Infinidoge Date: Fri, 31 Jan 2025 02:31:56 -0500 Subject: [PATCH] format --- printer.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/printer.py b/printer.py index bc23cbb..8e377f1 100644 --- a/printer.py +++ b/printer.py @@ -87,7 +87,7 @@ class ReceiptPrinter(CupsPrinter): return CallbackContext(exit=super().set_with_default) def split(self, left, right, cols=48): - self.textln(f"{left:<{cols//2}}{right:<{cols//2}}") + self.textln(f"{left:<{cols // 2}}{right:<{cols // 2}}") def vsplit(self, *args, **kwargs): return Split2Context(self, *args, **kwargs) @@ -111,7 +111,15 @@ class ReceiptPrinter(CupsPrinter): def title(self, text, size=6, width=None, height=None): width = width or size height = height or size - with self.set(align="center", bold=True, invert=True, smooth=True, custom_size=True, width=width, height=height): + with self.set( + align="center", + bold=True, + invert=True, + smooth=True, + custom_size=True, + width=width, + height=height, + ): self.textln(text) self.ln()