mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
Fix __new__ issues in 3.14 (#14626)
This commit is contained in:
+11
-4
@@ -169,10 +169,17 @@ class partialmethod(Generic[_T]):
|
||||
func: Callable[..., _T] | _Descriptor
|
||||
args: tuple[Any, ...]
|
||||
keywords: dict[str, Any]
|
||||
@overload
|
||||
def __init__(self, func: Callable[..., _T], /, *args: Any, **keywords: Any) -> None: ...
|
||||
@overload
|
||||
def __init__(self, func: _Descriptor, /, *args: Any, **keywords: Any) -> None: ...
|
||||
if sys.version_info >= (3, 14):
|
||||
@overload
|
||||
def __new__(self, func: Callable[..., _T], /, *args: Any, **keywords: Any) -> Self: ...
|
||||
@overload
|
||||
def __new__(self, func: _Descriptor, /, *args: Any, **keywords: Any) -> Self: ...
|
||||
else:
|
||||
@overload
|
||||
def __init__(self, func: Callable[..., _T], /, *args: Any, **keywords: Any) -> None: ...
|
||||
@overload
|
||||
def __init__(self, func: _Descriptor, /, *args: Any, **keywords: Any) -> None: ...
|
||||
|
||||
def __get__(self, obj: Any, cls: type[Any] | None = None) -> Callable[..., _T]: ...
|
||||
@property
|
||||
def __isabstractmethod__(self) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user