
    \Di	                        S r SSKJr  SSKrSr " S S\5      r " S S\5      r " S	 S
\5      r	 " S S\\
5      r " S S\\
5      rg)z1Exception classes for marshmallow-related errors.    )annotationsN_schemac                      \ rS rSrSrSrg)MarshmallowError   z.Base class for all marshmallow-related errors. N__name__
__module____qualname____firstlineno____doc____static_attributes__r       ^/var/www/html/Aiprofessor/professorTrac/lib/python3.13/site-packages/marshmallow/exceptions.pyr   r      s    8r   r   c                  b   ^  \ rS rSrSr\SS4       SU 4S jjjrS r\S	S j5       r	Sr
U =r$ )
ValidationError   a  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                   > [        U[        [        45      (       a  U/OUU l        X l        X0l        X@l        XPl        [        TU ]%  U5        g N)

isinstancestrbytesmessages
field_namedata
valid_datakwargssuper__init__)selfmessager   r   r   r   	__class__s         r   r    ValidationError.__init__   sA     &0#u%F%F	G$	$!r   c                    U R                   [        :X  a+  [        U R                  [        5      (       a  U R                  $ U R                   U R                  0$ r   )r   SCHEMAr   r   dictr!   s    r   normalized_messages#ValidationError.normalized_messages-   s;    ??f$DMM4)H)H== //r   c                    [        U R                  [        5      (       d+  [        S[	        U R                  5      R
                  -   5      eU R                  $ )Nz9cannot access 'messages_dict' when 'messages' is of type )r   r   r'   	TypeErrortyper
   r(   s    r   messages_dictValidationError.messages_dict2   sF    $--..Kt}}%../  }}r   )r   r   r   r   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    r)   propertyr.   r   __classcell__)r#   s   @r   r   r      s_    
 ! QU""" "	" O" ""0
  r   r   c                      \ rS rSrSrSrg)RegistryError<   zPRaised when an invalid operation is performed on the serializer
class registry.
r   Nr	   r   r   r   r4   r4   <   s    r   r4   c                      \ rS rSrSrSrg)StringNotCollectionErrorB   zBRaised when a string is passed when a list of strings is expected.r   Nr	   r   r   r   r7   r7   B   s    Lr   r7   c                      \ rS rSrSrSrg)FieldInstanceResolutionErrorF   zLRaised when schema to instantiate is neither a Schema class nor an instance.r   Nr	   r   r   r   r:   r:   F   s    Vr   r:   )r   
__future__r   typingr&   	Exceptionr   r   	NameErrorr4   r,   r7   r:   r   r   r   <module>r@      s]    7 "  
9y 9*& *ZI M/ MW#3Y Wr   