inspect: change for py313 (#11938)

This commit is contained in:
Shantanu
2024-05-18 02:55:55 -07:00
committed by GitHub
parent 54b39e1de4
commit 11075c6c37

View File

@@ -318,6 +318,7 @@ class Signature:
def bind(self, *args: Any, **kwargs: Any) -> BoundArguments: ...
def bind_partial(self, *args: Any, **kwargs: Any) -> BoundArguments: ...
def replace(self, *, parameters: Sequence[Parameter] | type[_void] | None = ..., return_annotation: Any = ...) -> Self: ...
__replace__ = replace
if sys.version_info >= (3, 10):
@classmethod
def from_callable(
@@ -332,6 +333,8 @@ class Signature:
else:
@classmethod
def from_callable(cls, obj: _IntrospectableCallable, *, follow_wrapped: bool = True) -> Self: ...
if sys.version_info >= (3, 13):
def format(self, *, max_width: int | None = None) -> str: ...
def __eq__(self, other: object) -> bool: ...
def __hash__(self) -> int: ...
@@ -392,6 +395,9 @@ class Parameter:
default: Any = ...,
annotation: Any = ...,
) -> Self: ...
if sys.version_info >= (3, 13):
__replace__ = replace
def __eq__(self, other: object) -> bool: ...
def __hash__(self) -> int: ...