From 618b23bc192b24bb90e21de85cfa1faa3c26e0bb Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Tue, 9 May 2023 01:24:08 +0200 Subject: [PATCH] fix comments --- src/escpos/escpos.py | 41 ++++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/src/escpos/escpos.py b/src/escpos/escpos.py index 3597e3c..0788124 100644 --- a/src/escpos/escpos.py +++ b/src/escpos/escpos.py @@ -1016,14 +1016,12 @@ class Escpos(object): if status[0] & RT_MASK_PAPER == RT_MASK_PAPER: return 2 - """ - Select where to print to - - Print to the thermal printer by default (ROLL) or - print to the slip dot matrix printer if supported (SLIP) - """ - def target(self, type="ROLL"): + """Select where to print to + + Print to the thermal printer by default (ROLL) or + print to the slip dot matrix printer if supported (SLIP) + """ if type.upper() == "ROLL": self._raw(SHEET_ROLL_MODE) elif type.upper() == "SLIP": @@ -1031,29 +1029,26 @@ class Escpos(object): else: raise ValueError("Unsupported target") - """ - Eject the slip/cheque - """ - def eject_slip(self): + """Eject the slip/cheque""" self._raw(SLIP_EJECT) - """ - Prints data from the buffer to the slip station and if the paper sensor is covered, - reverses the slip out the front of the printer far enough to be accessible to the operator. - The impact station opens the platen in all cases. - """ - def print_and_eject_slip(self): + """Print and eject + + Prints data from the buffer to the slip station and if the paper + sensor is covered, reverses the slip out the front of the printer + far enough to be accessible to the operator. + The impact station opens the platen in all cases. + """ self._raw(SLIP_PRINT_AND_EJECT) - """ - Selects the Slip Station for all functions. - The receipt station is the default setting after the printer is initialized or - the Clear Printer (0x10) command is received - """ - def use_slip_only(self): + """Selects the Slip Station for all functions. + + The receipt station is the default setting after the printer + is initialized or the Clear Printer (0x10) command is received + """ self._raw(SLIP_SELECT)