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:
@@ -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):
|
||||
|
Reference in New Issue
Block a user