Ë
    ¯Œj	  ã                  ó’   — d Z ddlmZ ddlZdZ G d„ de«      Z G d„ de«      Z G d	„ d
e«      Z	 G d„ dee
«      Z G d„ dee
«      Zy)z1Exception classes for marshmallow-related errors.é    )ÚannotationsNÚ_schemac                  ó   — e Zd ZdZy)ÚMarshmallowErrorz.Base class for all marshmallow-related errors.N©Ú__name__Ú
__module__Ú__qualname__Ú__doc__© ó    ú`/var/www/html/Fitness-lenito-AI-main/venv/lib/python3.12/site-packages/marshmallow/exceptions.pyr   r      s   „ Ú8r   r   c                  óR   ‡ — e Zd ZdZeddf	 	 	 	 	 	 	 dˆ fd„Zd„ Zedd„«       Zˆ xZ	S )ÚValidationErroraæ  Raised when validation fails on a field or schema.

    Validators and custom fields should raise this exception.

    :param message: An error message, list of error messages, or dict of
        error messages. If a dict, the keys are subitems and the values are error messages.
    :param field_name: Field name to store the error on.
        If `None`, the error is stored as schema-level error.
    :param data: Raw input data.
    :param valid_data: Valid (de)serialized data.
    Nc                óœ   •— t        |t        t        f«      r|gn|| _        || _        || _        || _        || _        t        ‰| �%  |«       y ©N)
Ú
isinstanceÚstrÚbytesÚmessagesÚ
field_nameÚdataÚ
valid_dataÚkwargsÚsuperÚ__init__)ÚselfÚmessager   r   r   r   Ú	__class__s         €r   r   zValidationError.__init__   sF   ø€ ô &0°¼#¼u¸Ô%F˜™	ÈGˆŒØ$ˆŒØˆŒ	Ø$ˆŒØˆŒÜ‰Ñ˜Õ!r   c                ó¤   — | j                   t        k(  r&t        | j                  t        «      r| j                  S | j                   | j                  iS r   )r   ÚSCHEMAr   r   Údict©r   s    r   Únormalized_messagesz#ValidationError.normalized_messages-   s8   € Ø�?‰?œfÒ$¬°D·M±MÄ4Ô)HØ—=‘=Ð Ø—‘ §¡Ð/Ð/r   c                ó¤   — t        | j                  t        «      s+t        dt	        | j                  «      j
                  z   «      ‚| j                  S )Nz9cannot access 'messages_dict' when 'messages' is of type )r   r   r"   Ú	TypeErrorÚtyper   r#   s    r   Úmessages_dictzValidationError.messages_dict2   sC   € ä˜$Ÿ-™-¬Ô.ÜØKÜ�t—}‘}Ó%×.Ñ.ñ/óð ð �}‰}Ðr   )r   zstr | list | dictr   r   r   zYtyping.Mapping[str, typing.Any] | typing.Iterable[typing.Mapping[str, typing.Any]] | Noner   z:list[dict[str, typing.Any]] | dict[str, typing.Any] | None)Úreturnzdict[str, typing.Any])
r   r	   r
   r   r!   r   r$   Úpropertyr(   Ú__classcell__)r   s   @r   r   r      sZ   ø„ ñ
ð !ð ØQUð"à"ð"ð ð"ðð	"ð Oõ"ò"0ð
 òó ôr   r   c                  ó   — e Zd ZdZy)ÚRegistryErrorzXRaised when an invalid operation is performed on the serializer
    class registry.
    Nr   r   r   r   r-   r-   <   s   „ òr   r-   c                  ó   — e Zd ZdZy)ÚStringNotCollectionErrorzBRaised when a string is passed when a list of strings is expected.Nr   r   r   r   r/   r/   B   s   „ ÚLr   r/   c                  ó   — e Zd ZdZy)ÚFieldInstanceResolutionErrorzLRaised when schema to instantiate is neither a Schema class nor an instance.Nr   r   r   r   r1   r1   F   s   „ ÚVr   r1   )r   Ú
__future__r   Útypingr!   Ú	Exceptionr   r   Ú	NameErrorr-   r&   r/   r1   r   r   r   Ú<module>r6      s]   ðÙ 7å "ã ð 
€ô9�yô 9ô*Ð&ô *ôZ�Iô ôMÐ/°ô MôWÐ#3°Yõ Wr   