MCPcopy Index your code
hub / github.com/RustPython/RustPython / replace

Method replace

Lib/inspect.py:3050–3063  ·  view source on GitHub ↗

Creates a customized copy of the Signature. Pass 'parameters' and/or 'return_annotation' arguments to override them in the new copy.

(self, *, parameters=_void, return_annotation=_void)

Source from the content-addressed store, hash-verified

3048 return self._return_annotation
3049
3050 def replace(self, *, parameters=_void, return_annotation=_void):
3051 """Creates a customized copy of the Signature.
3052 Pass 'parameters' and/or 'return_annotation' arguments
3053 to override them in the new copy.
3054 """
3055
3056 if parameters is _void:
3057 parameters = self.parameters.values()
3058
3059 if return_annotation is _void:
3060 return_annotation = self._return_annotation
3061
3062 return type(self)(parameters,
3063 return_annotation=return_annotation)
3064
3065 __replace__ = replace
3066

Callers

nothing calls this directly

Calls 1

valuesMethod · 0.45

Tested by

no test coverage detected