Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions stubs/pyserial/serial/rfc2217.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -183,5 +183,5 @@ class PortManager:
def telnet_send_option(self, action: bytes, option: bytes) -> None: ...
def rfc2217_send_subnegotiation(self, option: bytes, value: bytes = b"") -> None: ...
def check_modem_lines(self, force_notification: bool = False) -> None: ...
def escape(self, data: bytes) -> Generator[bytes, None, None]: ...
def filter(self, data: bytes) -> Generator[bytes, None, None]: ...
def escape(self, data: bytes) -> Generator[bytes]: ...
def filter(self, data: bytes) -> Generator[bytes]: ...
2 changes: 1 addition & 1 deletion stubs/pyserial/serial/serialutil.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,4 @@ class SerialBase(io.RawIOBase):
def send_break(self, duration: float = 0.25) -> None: ...
def read_all(self) -> bytes | None: ...
def read_until(self, expected: bytes = b"\n", size: int | None = None) -> bytes: ...
def iread_until(self, expected: bytes = ..., size: int | None = ...) -> Generator[bytes, None, None]: ...
def iread_until(self, expected: bytes = ..., size: int | None = ...) -> Generator[bytes]: ...
4 changes: 3 additions & 1 deletion stubs/pyserial/serial/tools/list_ports.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ import re
import sys
from collections.abc import Generator

from serial.tools.list_ports_common import ListPortInfo

if sys.platform == "win32":
from serial.tools.list_ports_windows import comports as comports
else:
from serial.tools.list_ports_posix import comports as comports

def grep(regexp: str | re.Pattern[str], include_links: bool = False) -> Generator[tuple[str, str, str], None, None]: ...
def grep(regexp: str | re.Pattern[str], include_links: bool = False) -> Generator[ListPortInfo]: ...
def main() -> None: ...
2 changes: 1 addition & 1 deletion stubs/pyserial/serial/tools/list_ports_windows.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,5 @@ if sys.platform == "win32":
depth: int = 0,
last_serial_number: str | None = None,
) -> str: ...
def iterate_comports() -> Generator[ListPortInfo, None, None]: ...
def iterate_comports() -> Generator[ListPortInfo]: ...
def comports(include_links: bool = False) -> list[ListPortInfo]: ...
4 changes: 2 additions & 2 deletions stubs/pyserial/serial/urlhandler/protocol_spy.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ from typing import TextIO, type_check_only

import serial

def sixteen(data: bytes) -> Generator[tuple[str, str] | tuple[None, None], None, None]: ...
def hexdump(data: bytes) -> Generator[tuple[int, str], None, None]: ...
def sixteen(data: bytes) -> Generator[tuple[str, str] | tuple[None, None]]: ...
def hexdump(data: bytes) -> Generator[tuple[int, str]]: ...
@type_check_only
class _Formatter:
def rx(self, data: bytes) -> None: ...
Expand Down