mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
Add @disjoint_base decorator in the stdlib (#14599)
And fix some other new stubtest finds.
This commit is contained in:
+3
-1
@@ -2,7 +2,7 @@ from _typeshed import ReadableBuffer, SupportsWrite
|
||||
from collections.abc import Callable, Iterable, Iterator, Mapping
|
||||
from pickle import PickleBuffer as PickleBuffer
|
||||
from typing import Any, Protocol, type_check_only
|
||||
from typing_extensions import TypeAlias
|
||||
from typing_extensions import TypeAlias, disjoint_base
|
||||
|
||||
@type_check_only
|
||||
class _ReadableFileobj(Protocol):
|
||||
@@ -57,6 +57,7 @@ class PicklerMemoProxy:
|
||||
def clear(self, /) -> None: ...
|
||||
def copy(self, /) -> dict[int, tuple[int, Any]]: ...
|
||||
|
||||
@disjoint_base
|
||||
class Pickler:
|
||||
fast: bool
|
||||
dispatch_table: Mapping[type, Callable[[Any], _ReducedType]]
|
||||
@@ -84,6 +85,7 @@ class UnpicklerMemoProxy:
|
||||
def clear(self, /) -> None: ...
|
||||
def copy(self, /) -> dict[int, tuple[int, Any]]: ...
|
||||
|
||||
@disjoint_base
|
||||
class Unpickler:
|
||||
def __init__(
|
||||
self,
|
||||
|
||||
Reference in New Issue
Block a user