mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-03-04 22:31:26 +08:00
Use typing_extensions.Self instead of _typeshed.Self (#9702)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import threading
|
||||
from _typeshed import ReadableBuffer, Self
|
||||
from _typeshed import ReadableBuffer
|
||||
from collections.abc import Callable
|
||||
from typing_extensions import Self
|
||||
|
||||
from serial import Serial
|
||||
|
||||
@@ -39,6 +40,6 @@ class ReaderThread(threading.Thread):
|
||||
def stop(self) -> None: ...
|
||||
def write(self, data: ReadableBuffer) -> int: ...
|
||||
def close(self) -> None: ...
|
||||
def connect(self: Self) -> tuple[Self, Protocol]: ...
|
||||
def connect(self) -> tuple[Self, Protocol]: ...
|
||||
def __enter__(self) -> Protocol: ...
|
||||
def __exit__(self, __exc_type: object, __exc_val: object, __exc_tb: object) -> None: ...
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import codecs
|
||||
import sys
|
||||
import threading
|
||||
from _typeshed import Self
|
||||
from collections.abc import Iterable
|
||||
from typing import Any, BinaryIO, TextIO
|
||||
from typing_extensions import Self
|
||||
|
||||
from serial import Serial
|
||||
|
||||
@@ -19,7 +19,7 @@ class ConsoleBase:
|
||||
def write_bytes(self, byte_string: bytes) -> None: ...
|
||||
def write(self, text: str) -> None: ...
|
||||
def cancel(self) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, *args: object, **kwargs: object) -> None: ...
|
||||
|
||||
if sys.platform == "win32":
|
||||
|
||||
Reference in New Issue
Block a user