1
0
mirror of https://github.com/python-escpos/python-escpos synced 2025-08-24 09:03:34 +00:00

Refactor to using f-strings (#608)

* update authors

* refactor to using f-strings
This commit is contained in:
Patrick Kanzler
2023-12-11 00:34:29 +01:00
committed by GitHub
parent dcc71ce47d
commit 91cbc264fc
7 changed files with 37 additions and 60 deletions

View File

@@ -47,14 +47,14 @@ def print_codepage(printer, codepage):
# Table header
printer.set(font="b")
printer._raw(" {}\n".format(sep.join(map(lambda s: hex(s)[2:], range(0, 16)))))
printer._raw(f" {sep.join(map(lambda s: hex(s)[2:], range(0, 16)))}\n")
printer.set()
# The table
for x in range(0, 16):
# First column
printer.set(font="b")
printer._raw("{} ".format(hex(x)[2:]))
printer._raw(f"{hex(x)[2:]} ")
printer.set()
for y in range(0, 16):