summaryrefslogtreecommitdiff
path: root/typings/serial
diff options
context:
space:
mode:
Diffstat (limited to 'typings/serial')
-rw-r--r--typings/serial/serialposix.pyi34
-rw-r--r--typings/serial/serialutil.pyi37
-rw-r--r--typings/serial/serialwin32.pyi34
-rw-r--r--typings/serial/tools/list_ports.pyi16
-rw-r--r--typings/serial/tools/list_ports_common.pyi16
-rw-r--r--typings/serial/tools/list_ports_linux.pyi11
-rw-r--r--typings/serial/tools/list_ports_windows.pyi8
7 files changed, 0 insertions, 156 deletions
diff --git a/typings/serial/serialposix.pyi b/typings/serial/serialposix.pyi
deleted file mode 100644
index 9f41fd2..0000000
--- a/typings/serial/serialposix.pyi
+++ /dev/null
@@ -1,34 +0,0 @@
-from typing import Any, Optional
-from serial.serialutil import SerialBase
-
-
-class PlatformSpecificBase:
- ...
-
-
-class PlatformSpecific(PlatformSpecificBase):
- ...
-
-
-class Serial(SerialBase, PlatformSpecific):
- """\
- Serial port class POSIX implementation. Serial port configuration is
- done with termios and fcntl. Runs on Linux and many other Un*x like
- systems.
- """
-
- def close(self) -> None:
- """Close port"""
- ...
-
- def read(self, size: Optional[int] = ...) -> bytes:
- """\
- Read size bytes from the serial port. If a timeout is set it may
- return less characters as requested. With no timeout it will block
- until the requested number of bytes is read.
- """
- ...
-
- def __enter__(self) -> Serial: ...
-
- def __exit__(self, *args: Any, **kwargs: Any) -> None: ...
diff --git a/typings/serial/serialutil.pyi b/typings/serial/serialutil.pyi
deleted file mode 100644
index d24f7d1..0000000
--- a/typings/serial/serialutil.pyi
+++ /dev/null
@@ -1,37 +0,0 @@
-import io
-from typing import Any, Optional
-
-
-class SerialBase(io.RawIOBase):
- """\
- Serial port base class. Provides __init__ function and properties to
- get/set port settings.
- """
-
- def __init__(
- self,
- port: Optional[str] = ...,
- baudrate: Optional[int] = ...,
- **kwargs: Any
- ) -> None:
- """Initialize comm port object. If a "port" is given, then the port
- will be opened immediately. Otherwise a Serial port object in closed
- state is returned.
- """
- ...
-
- @property
- def baudrate(self) -> int: ...
-
- @baudrate.setter
- def baudrate(self) -> None: ...
-
- def setRTS(self, value: Optional[bool] = ...) -> None:
- ...
-
- def setDTR(self, value: Optional[bool] = ...) -> None:
- ...
-
- @property
- def is_open(self) -> bool:
- ...
diff --git a/typings/serial/serialwin32.pyi b/typings/serial/serialwin32.pyi
deleted file mode 100644
index 5124dd2..0000000
--- a/typings/serial/serialwin32.pyi
+++ /dev/null
@@ -1,34 +0,0 @@
-"""
-This type stub file was generated by pyright.
-"""
-
-from typing import Any, Optional
-from serial.serialutil import SerialBase
-
-
-class Serial(SerialBase):
- """Serial port implementation for Win32 based on ctypes."""
-
- def __init__(
- self,
- port: Optional[str] = ...,
- baudrate: Optional[int] = ...,
- **kwargs: Any
- ) -> None:
- ...
-
- def close(self) -> None:
- """Close port"""
- ...
-
- def read(self, size: Optional[int] = ...) -> bytes:
- """\
- Read size bytes from the serial port. If a timeout is set it may
- return less characters as requested. With no timeout it will block
- until the requested number of bytes is read.
- """
- ...
-
- def __enter__(self) -> Serial: ...
-
- def __exit__(self, *args: Any, **kwargs: Any) -> None: ...
diff --git a/typings/serial/tools/list_ports.pyi b/typings/serial/tools/list_ports.pyi
deleted file mode 100644
index 67df6f6..0000000
--- a/typings/serial/tools/list_ports.pyi
+++ /dev/null
@@ -1,16 +0,0 @@
-"""\
-This module will provide a function called comports that returns an
-iterable (generator or list) that will enumerate available com ports. Note that
-on some systems non-existent ports may be listed.
-
-Additionally a grep function is supplied that can be used to search for ports
-based on their descriptions or hardware ID.
-"""
-from typing import Any, List, Optional
-
-from list_ports_common import ListPortInfo
-
-
-def comports(include_links: Optional[Any] = ...) -> List[ListPortInfo]:
- """Return a list of info objects about serial ports"""
- ...
diff --git a/typings/serial/tools/list_ports_common.pyi b/typings/serial/tools/list_ports_common.pyi
deleted file mode 100644
index 60920d0..0000000
--- a/typings/serial/tools/list_ports_common.pyi
+++ /dev/null
@@ -1,16 +0,0 @@
-from typing import Any, Optional
-
-
-class ListPortInfo:
- """Info collection base class for serial ports"""
-
- def __init__(
- self,
- device: Any,
- skip_link_detection: Optional[Any] = ...
- ) -> None:
- ...
-
- @property
- def device(self) -> str:
- ...
diff --git a/typings/serial/tools/list_ports_linux.pyi b/typings/serial/tools/list_ports_linux.pyi
deleted file mode 100644
index ccb94ed..0000000
--- a/typings/serial/tools/list_ports_linux.pyi
+++ /dev/null
@@ -1,11 +0,0 @@
-from typing import Any, List, Optional
-import serial.tools.list_ports_common
-
-
-class SysFS(serial.tools.list_ports_common.ListPortInfo):
- """Wrapper for easy sysfs access and device info"""
- ...
-
-
-def comports(include_links: Optional[Any] = ...) -> List[SysFS]:
- ...
diff --git a/typings/serial/tools/list_ports_windows.pyi b/typings/serial/tools/list_ports_windows.pyi
deleted file mode 100644
index 314af5b..0000000
--- a/typings/serial/tools/list_ports_windows.pyi
+++ /dev/null
@@ -1,8 +0,0 @@
-from typing import Any, List, Optional
-
-from serial.tools.list_ports_common import ListPortInfo
-
-
-def comports(include_links: Optional[Any] = ...) -> List[ListPortInfo]:
- """Return a list of info objects about serial ports"""
- ...