Fix mypy complains

This commit is contained in:
belono 2023-09-05 12:39:59 +02:00
parent e434164202
commit e8814e4acb
3 changed files with 6 additions and 6 deletions

View File

@ -53,7 +53,7 @@ class Network(Escpos):
def __init__(
self,
host: str = None,
host: str = "",
port: int = 9100,
timeout: Union[int, float] = 60,
*args,

View File

@ -10,7 +10,7 @@
import functools
from typing import Union
from typing import Union, Optional
from ..escpos import Escpos
@ -78,8 +78,8 @@ class Serial(Escpos):
baudrate: int = 9600,
bytesize: int = 8,
timeout: Union[int, float] = 1,
parity=None, # type: str?
stopbits=None, # type: int?
parity: Optional[str] = None,
stopbits: Optional[int] = None,
xonxoff: bool = False,
dsrdtr: bool = True,
*args,

View File

@ -77,8 +77,8 @@ class Usb(Escpos):
idProduct: str = "",
usb_args: Dict[str, str] = {},
timeout: Union[int, float] = 0,
in_ep=0x82, # type: int?
out_ep=0x01, # type: int?
in_ep: int = 0x82,
out_ep: int = 0x01,
*args,
**kwargs
):