mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-09-01 04:26:57 +08:00
Add @disjoint_base decorator in the stdlib (#14599)
And fix some other new stubtest finds.
This commit is contained in:
+2
-1
@@ -4,7 +4,7 @@ from _weakrefset import WeakSet as WeakSet
|
||||
from collections.abc import Callable, Iterable, Iterator, Mapping, MutableMapping
|
||||
from types import GenericAlias
|
||||
from typing import Any, ClassVar, Generic, TypeVar, final, overload
|
||||
from typing_extensions import ParamSpec, Self
|
||||
from typing_extensions import ParamSpec, Self, disjoint_base
|
||||
|
||||
__all__ = [
|
||||
"ref",
|
||||
@@ -52,6 +52,7 @@ class ProxyType(Generic[_T]): # "weakproxy"
|
||||
def __getattr__(self, attr: str) -> Any: ...
|
||||
__hash__: ClassVar[None] # type: ignore[assignment]
|
||||
|
||||
@disjoint_base
|
||||
class ReferenceType(Generic[_T]): # "weakref"
|
||||
__callback__: Callable[[Self], Any]
|
||||
def __new__(cls, o: _T, callback: Callable[[Self], Any] | None = ..., /) -> Self: ...
|
||||
|
||||
Reference in New Issue
Block a user