mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-29 15:16:54 +08:00
Make several type aliases private (#7661)
This commit is contained in:
@@ -3,14 +3,14 @@ from typing_extensions import TypeAlias
|
||||
from weakref import ReferenceType
|
||||
|
||||
__all__ = ["local"]
|
||||
localdict: TypeAlias = dict[Any, Any]
|
||||
_localdict: TypeAlias = dict[Any, Any]
|
||||
|
||||
class _localimpl:
|
||||
key: str
|
||||
dicts: dict[int, tuple[ReferenceType[Any], localdict]]
|
||||
dicts: dict[int, tuple[ReferenceType[Any], _localdict]]
|
||||
def __init__(self) -> None: ...
|
||||
def get_dict(self) -> localdict: ...
|
||||
def create_dict(self) -> localdict: ...
|
||||
def get_dict(self) -> _localdict: ...
|
||||
def create_dict(self) -> _localdict: ...
|
||||
|
||||
class local:
|
||||
def __getattribute__(self, name: str) -> Any: ...
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
AdpcmState: TypeAlias = tuple[int, int]
|
||||
RatecvState: TypeAlias = tuple[int, tuple[tuple[int, int], ...]]
|
||||
_AdpcmState: TypeAlias = tuple[int, int]
|
||||
_RatecvState: TypeAlias = tuple[int, tuple[tuple[int, int], ...]]
|
||||
|
||||
class error(Exception): ...
|
||||
|
||||
def add(__fragment1: bytes, __fragment2: bytes, __width: int) -> bytes: ...
|
||||
def adpcm2lin(__fragment: bytes, __width: int, __state: AdpcmState | None) -> tuple[bytes, AdpcmState]: ...
|
||||
def adpcm2lin(__fragment: bytes, __width: int, __state: _AdpcmState | None) -> tuple[bytes, _AdpcmState]: ...
|
||||
def alaw2lin(__fragment: bytes, __width: int) -> bytes: ...
|
||||
def avg(__fragment: bytes, __width: int) -> int: ...
|
||||
def avgpp(__fragment: bytes, __width: int) -> int: ...
|
||||
@@ -17,7 +17,7 @@ def findfactor(__fragment: bytes, __reference: bytes) -> float: ...
|
||||
def findfit(__fragment: bytes, __reference: bytes) -> tuple[int, float]: ...
|
||||
def findmax(__fragment: bytes, __length: int) -> int: ...
|
||||
def getsample(__fragment: bytes, __width: int, __index: int) -> int: ...
|
||||
def lin2adpcm(__fragment: bytes, __width: int, __state: AdpcmState | None) -> tuple[bytes, AdpcmState]: ...
|
||||
def lin2adpcm(__fragment: bytes, __width: int, __state: _AdpcmState | None) -> tuple[bytes, _AdpcmState]: ...
|
||||
def lin2alaw(__fragment: bytes, __width: int) -> bytes: ...
|
||||
def lin2lin(__fragment: bytes, __width: int, __newwidth: int) -> bytes: ...
|
||||
def lin2ulaw(__fragment: bytes, __width: int) -> bytes: ...
|
||||
@@ -31,10 +31,10 @@ def ratecv(
|
||||
__nchannels: int,
|
||||
__inrate: int,
|
||||
__outrate: int,
|
||||
__state: RatecvState | None,
|
||||
__state: _RatecvState | None,
|
||||
__weightA: int = ...,
|
||||
__weightB: int = ...,
|
||||
) -> tuple[bytes, RatecvState]: ...
|
||||
) -> tuple[bytes, _RatecvState]: ...
|
||||
def reverse(__fragment: bytes, __width: int) -> bytes: ...
|
||||
def rms(__fragment: bytes, __width: int) -> int: ...
|
||||
def tomono(__fragment: bytes, __width: int, __lfactor: float, __rfactor: float) -> bytes: ...
|
||||
|
||||
@@ -20,7 +20,7 @@ _T6 = TypeVar("_T6")
|
||||
|
||||
_Step: TypeAlias = int | float | SupportsFloat | SupportsInt | SupportsIndex | SupportsComplex
|
||||
|
||||
Predicate: TypeAlias = Callable[[_T], object]
|
||||
_Predicate: TypeAlias = Callable[[_T], object]
|
||||
|
||||
# Technically count can take anything that implements a number protocol and has an add method
|
||||
# but we can't enforce the add method
|
||||
@@ -76,12 +76,12 @@ class compress(Iterator[_T], Generic[_T]):
|
||||
def __next__(self) -> _T: ...
|
||||
|
||||
class dropwhile(Iterator[_T], Generic[_T]):
|
||||
def __init__(self, __predicate: Predicate[_T], __iterable: Iterable[_T]) -> None: ...
|
||||
def __init__(self, __predicate: _Predicate[_T], __iterable: Iterable[_T]) -> None: ...
|
||||
def __iter__(self: Self) -> Self: ...
|
||||
def __next__(self) -> _T: ...
|
||||
|
||||
class filterfalse(Iterator[_T], Generic[_T]):
|
||||
def __init__(self, __predicate: Predicate[_T] | None, __iterable: Iterable[_T]) -> None: ...
|
||||
def __init__(self, __predicate: _Predicate[_T] | None, __iterable: Iterable[_T]) -> None: ...
|
||||
def __iter__(self: Self) -> Self: ...
|
||||
def __next__(self) -> _T: ...
|
||||
|
||||
@@ -107,7 +107,7 @@ class starmap(Iterator[_T], Generic[_T]):
|
||||
def __next__(self) -> _T: ...
|
||||
|
||||
class takewhile(Iterator[_T], Generic[_T]):
|
||||
def __init__(self, __predicate: Predicate[_T], __iterable: Iterable[_T]) -> None: ...
|
||||
def __init__(self, __predicate: _Predicate[_T], __iterable: Iterable[_T]) -> None: ...
|
||||
def __iter__(self: Self) -> Self: ...
|
||||
def __next__(self) -> _T: ...
|
||||
|
||||
|
||||
@@ -410,7 +410,8 @@ class InternalError(DatabaseError): ...
|
||||
class NotSupportedError(DatabaseError): ...
|
||||
class OperationalError(DatabaseError): ...
|
||||
|
||||
OptimizedUnicode = str
|
||||
if sys.version_info < (3, 10):
|
||||
OptimizedUnicode = str
|
||||
|
||||
@final
|
||||
class PrepareProtocol:
|
||||
|
||||
Reference in New Issue
Block a user