관리-도구
편집 파일: validate_call.cpython-311.pyc
� ���e� � �� � d Z ddlmZ ddlmZmZmZmZm Z ddl mZ dZerddl mZ eded ef � � � Ze ddd �dd�� � Ze dd�� � Z dddd �dd�ZdS )z(Decorator for validating function calls.� )�annotations)� TYPE_CHECKING�Any�Callable�TypeVar�overload� )�_validate_call)� validate_call)� ConfigDict�AnyCallableT.)�boundNF��config�validate_returnr �ConfigDict | Noner �bool�return�&Callable[[AnyCallableT], AnyCallableT]c � � d S �N� r s �K/opt/cloudlinux/venv/lib/python3.11/site-packages/pydantic/validate_call.pyr r s � � �C� �__funcc � � d S r r )r s r r r s � ��Cr �AnyCallableT | None�5AnyCallableT | Callable[[AnyCallableT], AnyCallableT]c �2 ��� d��fd�}| r || � � S |S )a� Usage docs: https://docs.pydantic.dev/2.4/concepts/validation_decorator/ Returns a decorated wrapper around the function that validates the arguments and, optionally, the return value. Usage may be either as a plain decorator `@validate_call` or with arguments `@validate_call(...)`. Args: __func: The function to be decorated. config: The configuration dictionary. validate_return: Whether to validate the return value. Returns: The decorated function. �functionr r c � �� t | t t f� � r*t | � � j }t d|� d|� d�� � �t j | ��� � S )NzThe `@z<` decorator should be applied after `@validate_call` (put `@z ` on top))� isinstance�classmethod�staticmethod�type�__name__� TypeErrorr �ValidateCallWrapper)r �namer r s ��r �validatezvalidate_call.<locals>.validate1 sa �� ��h��l� ;�<�<� x���>�>�*�D��v�T�v�v�gk�v�v�v�w�w�w��1�(�F�O�T�T�Tr N)r r r r r )r r r r* s `` r r r sM ��� �*U� U� U� U� U� U� U� � ��x������r )r r r r r r )r r r r r )r r r r r r r r )�__doc__� __future__r �_annotations�typingr r r r r � _internalr �__all__r r r r r r r �<module>r1 s �� .� .� 2� 2� 2� 2� 2� 2� B� B� B� B� B� B� B� B� B� B� B� B� B� B� %� %� %� %� %� %� ��� E�"�"�"�"�"�"��7�>��#�s�(�1C�D�D�D�L� �#'��� � � � � ��� �� � � ��� #'�� !%�!� � � � � � � � r