diff --git a/src/escpos/printer/cups.py b/src/escpos/printer/cups.py index adc35a0..0625b01 100644 --- a/src/escpos/printer/cups.py +++ b/src/escpos/printer/cups.py @@ -176,7 +176,6 @@ class CupsPrinter(Escpos): self.pending_job = False raise ValueError("Printer job not opened") - @dependency_pycups def send(self): """Send the print job to the printer.""" if self.pending_job: diff --git a/src/escpos/printer/lp.py b/src/escpos/printer/lp.py index 36f1e6b..951df66 100644 --- a/src/escpos/printer/lp.py +++ b/src/escpos/printer/lp.py @@ -63,6 +63,7 @@ class LP(Escpos): """ return is_usable() + @dependency_linux_lp def __init__(self, printer_name: str = "", *args, **kwargs): """LP class constructor. @@ -108,7 +109,6 @@ class LP(Escpos): return "" return name - @dependency_linux_lp def open( self, job_name: str = "python-escpos", diff --git a/src/escpos/printer/win32raw.py b/src/escpos/printer/win32raw.py index 125551d..396c3e9 100644 --- a/src/escpos/printer/win32raw.py +++ b/src/escpos/printer/win32raw.py @@ -87,7 +87,6 @@ class Win32Raw(Escpos): ] = False @property - @dependency_win32print def printers(self) -> dict: """Available Windows printers.""" return { @@ -95,7 +94,6 @@ class Win32Raw(Escpos): for printer in win32print.EnumPrinters(win32print.PRINTER_ENUM_NAME, "", 4) } - @dependency_win32print def open( self, job_name: str = "python-escpos", raise_not_found: bool = True ) -> None: @@ -138,7 +136,6 @@ class Win32Raw(Escpos): return logging.info("Win32Raw printer enabled") - @dependency_win32print def close(self) -> None: """Close connection to default printer.""" if not self._device: @@ -149,7 +146,6 @@ class Win32Raw(Escpos): win32print.ClosePrinter(self._device) self._device = False - @dependency_win32print def _raw(self, msg): """Print any command sent in raw format.