mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-04 12:35:49 +08:00
pyserial: Update type yielded by grep from tuple to ListPortInfo (#14807)
This commit is contained in:
@@ -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]: ...
|
||||
|
||||
@@ -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]: ...
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
@@ -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]: ...
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user