ó
    pyüi¥  ã                  ó  • % S r SSKJr  SSKJrJrJrJr  SSKJ	r	J
r
Jr  SSKJrJr  SSKJr  SrSrS	\S
'    " S S\5      r\S   rS	\S'    " S S\5      r " S S\5      r " S S\\5      r " S S\\5      rSrS	\S'    " S S\\5      rg)zš!!! abstract "Usage Documentation"
    [Build a Plugin](../concepts/plugins.md#build-a-plugin)

Plugin interface for Pydantic plugins, and related types.
é    )Úannotations)ÚAnyÚCallableÚLiteralÚ
NamedTuple)Ú
CoreConfigÚ
CoreSchemaÚValidationError)ÚProtocolÚ	TypeAlias)ÚExtraValues)ÚPydanticPluginProtocolÚBaseValidateHandlerProtocolÚValidatePythonHandlerProtocolÚValidateJsonHandlerProtocolÚValidateStringsHandlerProtocolÚNewSchemaReturnsÚSchemaTypePathÚ
SchemaKindúvtuple[ValidatePythonHandlerProtocol | None, ValidateJsonHandlerProtocol | None, ValidateStringsHandlerProtocol | None]r   r   c                  ó.   • \ rS rSr% SrS\S'   S\S'   Srg)r   é   zQPath defining where `schema_type` was defined, or where `TypeAdapter` was called.ÚstrÚmoduleÚname© N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__annotations__Ú__static_attributes__r   ó    ÚU/home/mande/repo/quber/.venv/lib/python3.13/site-packages/pydantic/plugin/__init__.pyr   r      s   ‡ Ù[àƒKØ
†Ir$   r   )Ú	BaseModelÚTypeAdapterÚ	dataclassÚcreate_modelÚvalidate_callr   c                  ó>   • \ rS rSrSr              SS jrSrg)r   é(   z5Protocol defining the interface for Pydantic plugins.c                ó   • [        S5      e)a  This method is called for each plugin every time a new [`SchemaValidator`][pydantic_core.SchemaValidator]
is created.

It should return an event handler for each of the three validation methods, or `None` if the plugin does not
implement that method.

Args:
    schema: The schema to validate against.
    schema_type: The original type which the schema was created from, e.g. the model class.
    schema_type_path: Path defining where `schema_type` was defined, or where `TypeAdapter` was called.
    schema_kind: The kind of schema to validate against.
    config: The config to use for validation.
    plugin_settings: Any plugin settings.

Returns:
    A tuple of optional event handlers for each of the three validation methods -
        `validate_python`, `validate_json`, `validate_strings`.
z9Pydantic plugins should implement `new_schema_validator`.)ÚNotImplementedError)ÚselfÚschemaÚschema_typeÚschema_type_pathÚschema_kindÚconfigÚplugin_settingss          r%   Únew_schema_validatorÚ+PydanticPluginProtocol.new_schema_validator+   s   € ô: "Ð"]Ó^Ð^r$   r   N)r0   r	   r1   r   r2   r   r3   r   r4   zCoreConfig | Noner5   zdict[str, object]Úreturnr   )r   r   r   r    r!   r6   r#   r   r$   r%   r   r   (   sV   † Ù?ð_àð_ð ð_ð )ð	_ð
  ð_ð "ð_ð +ð_ð
÷_r$   r   c                  óD   • \ rS rSr% SrS\S'    S
S jrSS jrSS jrSr	g	)r   éK   z¯Base class for plugin callbacks protocols.

You shouldn't implement this protocol directly, instead use one of the subclasses with adds the correctly
typed `on_error` method.
zCallable[..., None]Úon_enterc                ó   • g)zcCallback to be notified of successful validation.

Args:
    result: The result of the validation.
Nr   )r/   Úresults     r%   Ú
on_successÚ&BaseValidateHandlerProtocol.on_successU   ó   € ð 	r$   c                ó   • g)zVCallback to be notified of validation errors.

Args:
    error: The validation error.
Nr   )r/   Úerrors     r%   Úon_errorÚ$BaseValidateHandlerProtocol.on_error]   r@   r$   c                ó   • g)zpCallback to be notified of validation exceptions.

Args:
    exception: The exception raised during validation.
Nr   )r/   Ú	exceptions     r%   Úon_exceptionÚ(BaseValidateHandlerProtocol.on_exceptione   r@   r$   r   N)r=   r   r8   ÚNone)rB   r
   r8   rI   )rF   Ú	Exceptionr8   rI   )
r   r   r   r    r!   r"   r>   rC   rG   r#   r   r$   r%   r   r   K   s!   ‡ ñð "Ó!ØEôô÷r$   r   c                  óX   • \ rS rSrSrSSSSSSSS.                 SS jjrSrg)r   én   z4Event handler for `SchemaValidator.validate_python`.N)ÚstrictÚextraÚfrom_attributesÚcontextÚself_instanceÚby_aliasÚby_namec               ó   • g)a  Callback to be notified of validation start, and create an instance of the event handler.

Args:
    input: The input to be validated.
    strict: Whether to validate the object in strict mode.
    extra: Whether to ignore, allow, or forbid extra data during model validation.
    from_attributes: Whether to validate objects as inputs by extracting attributes.
    context: The context to use for validation, this is passed to functional validators.
    self_instance: An instance of a model to set attributes on from validation, this is used when running
        validation from the `__init__` method of a model.
    by_alias: Whether to use the field's alias to match the input data to an attribute.
    by_name: Whether to use the field's name to match the input data to an attribute.
Nr   )	r/   ÚinputrM   rN   rO   rP   rQ   rR   rS   s	            r%   r;   Ú&ValidatePythonHandlerProtocol.on_enterq   ó   � r$   r   )rU   r   rM   úbool | NonerN   úExtraValues | NonerO   rX   rP   ú
Any | NonerQ   rZ   rR   rX   rS   rX   r8   rI   ©r   r   r   r    r!   r;   r#   r   r$   r%   r   r   n   s~   † Ù>ð #Ø$(Ø'+Ø"Ø$(Ø $Ø#ñàðð ð	ð
 "ðð %ðð ðð "ðð ðð ðð 
÷ð r$   r   c                  óR   • \ rS rSrSrSSSSSSS.               SS jjrSrg)r   éŒ   z2Event handler for `SchemaValidator.validate_json`.N)rM   rN   rP   rQ   rR   rS   c               ó   • g)aÄ  Callback to be notified of validation start, and create an instance of the event handler.

Args:
    input: The JSON data to be validated.
    strict: Whether to validate the object in strict mode.
    extra: Whether to ignore, allow, or forbid extra data during model validation.
    context: The context to use for validation, this is passed to functional validators.
    self_instance: An instance of a model to set attributes on from validation, this is used when running
        validation from the `__init__` method of a model.
    by_alias: Whether to use the field's alias to match the input data to an attribute.
    by_name: Whether to use the field's name to match the input data to an attribute.
Nr   )r/   rU   rM   rN   rP   rQ   rR   rS   s           r%   r;   Ú$ValidateJsonHandlerProtocol.on_enter�   rW   r$   r   )rU   zstr | bytes | bytearrayrM   rX   rN   rY   rP   rZ   rQ   rZ   rR   rX   rS   rX   r8   rI   r[   r   r$   r%   r   r   Œ   sq   † Ù<ð #Ø$(Ø"Ø$(Ø $Ø#ñà&ðð ð	ð
 "ðð ðð "ðð ðð ðð 
÷ð r$   r   zdict[str, StringInput]ÚStringInputc                  óL   • \ rS rSrSrSSSSSS.             SS jjrSrg)r   é«   z5Event handler for `SchemaValidator.validate_strings`.N)rM   rN   rP   rR   rS   c               ó   • g)a"  Callback to be notified of validation start, and create an instance of the event handler.

Args:
    input: The string data to be validated.
    strict: Whether to validate the object in strict mode.
    extra: Whether to ignore, allow, or forbid extra data during model validation.
    context: The context to use for validation, this is passed to functional validators.
    by_alias: Whether to use the field's alias to match the input data to an attribute.
    by_name: Whether to use the field's name to match the input data to an attribute.
Nr   )r/   rU   rM   rN   rP   rR   rS   s          r%   r;   Ú'ValidateStringsHandlerProtocol.on_enter®   rW   r$   r   )rU   r`   rM   rX   rN   rY   rP   rZ   rR   rX   rS   rX   r8   rI   r[   r   r$   r%   r   r   «   sd   † Ù?ð #Ø$(Ø"Ø $Ø#ñàðð ð	ð
 "ðð ðð ðð ðð 
÷ð r$   r   N)r!   Ú
__future__r   Útypingr   r   r   r   Úpydantic_corer   r	   r
   Útyping_extensionsr   r   Úpydantic.configr   Ú__all__r   r"   r   r   r   r   r   r   r`   r   r   r$   r%   Ú<module>rk      s¬   ðòõ #ç 5Ó 5ç AÑ Aß 1å 'ð	€ð WÐ �)ó  Wô�Zô ð  Ð hÑi€
ˆIÓ iô _˜Xô  _ôF  (ô  ôFÐ$?Àô ô<Ð"=¸xô ð8 2€ˆYÓ 1ôÐ%@À(õ r$   