a
    “˜ëjJ  ã                   @  st   d Z ddlmZ ddlmZ ddlmZmZ ddlm	Z	 ddl
mZ ddlmZmZmZ dd
dddddœdd„Zd	S )zdExperimental module exposing a function to generate a core schema that validates callable arguments.é    )Úannotations)ÚCallable)ÚAnyÚLiteral)Ú
CoreSchema)Ú
ConfigDict)Ú_configÚ_generate_schemaÚ_namespace_utilsúarguments-v3NzCallable[..., Any]z$Literal['arguments', 'arguments-v3']z8Callable[[int, str, Any], Literal['skip'] | None] | NonezConfigDict | Noner   )ÚfuncÚschema_typeÚparameters_callbackÚconfigÚreturnc                 C  sN   t jt |¡tjt | ¡d�d�}|dkr8| | |¡}n| | |¡}| 	|¡S )a§  Generate the schema for the arguments of a function.

    Args:
        func: The function to generate the schema for.
        schema_type: The type of schema to generate.
        parameters_callback: A callable that will be invoked for each parameter. The callback
            should take three required arguments: the index, the name and the type annotation
            (or [`Parameter.empty`][inspect.Parameter.empty] if not annotated) of the parameter.
            The callback can optionally return `'skip'`, so that the parameter gets excluded
            from the resulting schema.
        config: The configuration to use.

    Returns:
        The generated schema.
    )Znamespaces_tuple)Zns_resolverÚ	arguments)
r	   ZGenerateSchemar   ZConfigWrapperr
   Z
NsResolverZns_for_functionZ_arguments_schemaZ_arguments_v3_schemaZclean_schema)r   r   r   r   Zgenerate_schemaZschema© r   úe/mnt/bigstor/www/usecases/.venv/lib/python3.9/site-packages/pydantic/experimental/arguments_schema.pyÚgenerate_arguments_schema   s    þr   )r   NN)Ú__doc__Ú
__future__r   Úcollections.abcr   Útypingr   r   Zpydantic_corer   Zpydanticr   Zpydantic._internalr   r	   r
   r   r   r   r   r   Ú<module>   s      ü