From 180721c03cc13e3f335398289db6c08395b3369b Mon Sep 17 00:00:00 2001 From: Alexandre Detiste Date: Wed, 13 Dec 2023 22:55:30 +0100 Subject: [PATCH] document a bug in typeshed --- src/escpos/printer/win32raw.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/escpos/printer/win32raw.py b/src/escpos/printer/win32raw.py index c4aed39..8de56eb 100644 --- a/src/escpos/printer/win32raw.py +++ b/src/escpos/printer/win32raw.py @@ -158,4 +158,8 @@ class Win32Raw(Escpos): raise DeviceNotFoundError("Printer not found") if not self.device: raise DeviceNotFoundError("Printer job not opened") - win32print.WritePrinter(self.device, msg) + win32print.WritePrinter(self.device, msg) # type: ignore + + # there is a bug in the typeshed + # https://github.com/mhammond/pywin32/blob/main/win32/src/win32print/win32print.cpp#L976 + # https://github.com/python/typeshed/blob/main/stubs/pywin32/win32/win32print.pyi#L27C4-L27C4