mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-08-11 02:12:29 +08:00
Remove old compatibility alias _BufferWithLen (#14151)
This commit is contained in:
@@ -298,9 +298,6 @@ class SupportsGetItemBuffer(SliceableBuffer, IndexableBuffer, Protocol):
|
||||
|
||||
class SizedBuffer(Sized, Buffer, Protocol): ...
|
||||
|
||||
# for compatibility with third-party stubs that may use this
|
||||
_BufferWithLen: TypeAlias = SizedBuffer # not stable # noqa: Y047
|
||||
|
||||
ExcInfo: TypeAlias = tuple[type[BaseException], BaseException, TracebackType]
|
||||
OptExcInfo: TypeAlias = ExcInfo | tuple[None, None, None]
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from _typeshed import _BufferWithLen
|
||||
from _typeshed import SizedBuffer
|
||||
from socket import socket
|
||||
from typing import Literal, TypeVar, overload
|
||||
|
||||
@@ -16,7 +16,7 @@ class bytesview:
|
||||
@overload
|
||||
def __init__(self, data: bytes | bytesview, offset: int, size: int) -> None: ...
|
||||
@overload
|
||||
def __init__(self, data: _BufferWithLen, offset: int = 0, size: int | None = None) -> None: ...
|
||||
def __init__(self, data: SizedBuffer, offset: int = 0, size: int | None = None) -> None: ...
|
||||
@overload
|
||||
def __getitem__(self, key: slice) -> bytes: ...
|
||||
@overload
|
||||
|
||||
Reference in New Issue
Block a user