
    ~3fi	                     4    d Z ddlmZ  G d d      Zd Zd Zy)zUtilities for storing collections of error messages.

.. warning::

    This module is treated as private API.
    Users should not need to use this module directly.
    )SCHEMAc                       e Zd Zd ZedfdZy)
ErrorStorec                     i | _         y N)errors)selfs    U/var/www/auto_recruiter/arenv/lib/python3.12/site-packages/marshmallow/error_store.py__init__zErrorStore.__init__   s	        Nc                     t        |      }|t        k7  st        |t              s||i}|||i}t	        | j
                  |      | _        y r   )copy_containersr   
isinstancedictmerge_errorsr   )r	   messages
field_nameindexs       r
   store_errorzErrorStore.store_error   sK     #8,z(D'A"H-Hx(H"4;;9r   )__name__
__module____qualname__r   r   r    r   r
   r   r      s     06T 	:r   r   c                     t        | t              r| D cg c]  }t        |       c}S t        | t              r-| j	                         D ci c]  \  }}|t        |       c}}S | S c c}w c c}}w r   )r   listr   r   items)r   valkeys      r
   r   r      s^    &$067$77&$:@,,.Ihc3_S))IIM 8Is   A)A.c                    | s|S |s| S t        | t              rnt        |t              r| j                  |       | S t        |t              r(t	        | |j                  t                    |t        <   |S | j                  |       | S t        | t              rnt        |t              r6|j                         D ]!  \  }}|| v rt	        | |   |      | |<   || |<   # | S t	        | j                  t              |      | t        <   | S t        |t              r| g|S t        |t              r(t	        | |j                  t                    |t        <   |S | |gS )zDeeply merge two error messages.

    The format of ``errors1`` and ``errors2`` matches the ``message``
    parameter of :exc:`marshmallow.exceptions.ValidationError`.
    )	r   r   extendr   r   getr   appendr   )errors1errors2r   r   s       r
   r   r   %   s3    '4 gt$NN7#Ngt$*7GKK4GHGFONw'4 gt$#MMO 'S'>#/c#BGCL#&GCL	'
 N&w{{6':GD'4 "'""'4 &wF0CDWr   N)__doc__marshmallow.exceptionsr   r   r   r   r   r   r
   <module>r'      s#    *: :""r   