MCPcopy
hub / github.com/pydantic/pydantic / extract_function_qualname

Function extract_function_qualname

pydantic/_internal/_validate_call.py:24–26  ·  view source on GitHub ↗

Extract the qualname of a `ValidateCallSupportedTypes` object.

(func: ValidateCallSupportedTypes)

Source from the content-addressed store, hash-verified

22
23
24def extract_function_qualname(func: ValidateCallSupportedTypes) -> str:
25 """Extract the qualname of a `ValidateCallSupportedTypes` object."""
26 return f'partial({func.func.__qualname__})' if isinstance(func, functools.partial) else func.__qualname__
27
28
29def update_wrapper_attributes(wrapped: ValidateCallSupportedTypes, wrapper: Callable[..., Any]):

Callers 2

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected