mirror of
				https://github.com/python-escpos/python-escpos
				synced 2025-10-23 09:30:00 +00:00 
			
		
		
		
	Fix mypy complains
This commit is contained in:
		@@ -53,7 +53,7 @@ class Network(Escpos):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    def __init__(
 | 
					    def __init__(
 | 
				
			||||||
        self,
 | 
					        self,
 | 
				
			||||||
        host: str = None,
 | 
					        host: str = "",
 | 
				
			||||||
        port: int = 9100,
 | 
					        port: int = 9100,
 | 
				
			||||||
        timeout: Union[int, float] = 60,
 | 
					        timeout: Union[int, float] = 60,
 | 
				
			||||||
        *args,
 | 
					        *args,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,7 +10,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import functools
 | 
					import functools
 | 
				
			||||||
from typing import Union
 | 
					from typing import Union, Optional
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from ..escpos import Escpos
 | 
					from ..escpos import Escpos
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -78,8 +78,8 @@ class Serial(Escpos):
 | 
				
			|||||||
        baudrate: int = 9600,
 | 
					        baudrate: int = 9600,
 | 
				
			||||||
        bytesize: int = 8,
 | 
					        bytesize: int = 8,
 | 
				
			||||||
        timeout: Union[int, float] = 1,
 | 
					        timeout: Union[int, float] = 1,
 | 
				
			||||||
        parity=None,  # type: str?
 | 
					        parity: Optional[str] = None,
 | 
				
			||||||
        stopbits=None,  # type: int?
 | 
					        stopbits: Optional[int] = None,
 | 
				
			||||||
        xonxoff: bool = False,
 | 
					        xonxoff: bool = False,
 | 
				
			||||||
        dsrdtr: bool = True,
 | 
					        dsrdtr: bool = True,
 | 
				
			||||||
        *args,
 | 
					        *args,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -77,8 +77,8 @@ class Usb(Escpos):
 | 
				
			|||||||
        idProduct: str = "",
 | 
					        idProduct: str = "",
 | 
				
			||||||
        usb_args: Dict[str, str] = {},
 | 
					        usb_args: Dict[str, str] = {},
 | 
				
			||||||
        timeout: Union[int, float] = 0,
 | 
					        timeout: Union[int, float] = 0,
 | 
				
			||||||
        in_ep=0x82,  # type: int?
 | 
					        in_ep: int = 0x82,
 | 
				
			||||||
        out_ep=0x01,  # type: int?
 | 
					        out_ep: int = 0x01,
 | 
				
			||||||
        *args,
 | 
					        *args,
 | 
				
			||||||
        **kwargs
 | 
					        **kwargs
 | 
				
			||||||
    ):
 | 
					    ):
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user