
    ch                        S r SSKJr  SSKrSSKJr  \R                  (       a  SSKJr  \	\   r
0 rSS jr\R                  SS.SS	 jj5       r\R                  SS.     SS
 jj5       rSS.SS jjrg)a!  A registry of :class:`Schema <marshmallow.Schema>` classes. This allows for string
lookup of schemas, which may be used with
class:`fields.Nested <marshmallow.fields.Nested>`.

.. warning::

    This module is treated as private API.
    Users should not need to use this module directly.
    )annotationsN)RegistryError)Schemac                P  ^ UR                   mT SU  3nU [        ;   a:  [        U4S j[        U     5       5      (       d  [        U    R                  U5        OU [        ;  a
  U/[        U '   U[        ;  a&  [        R	                  U/ 5      R                  U5        gU/[        U'   g)at  Add a class to the registry of serializer classes. When a class is
registered, an entry for both its classname and its full, module-qualified
path are added to the registry.

Example: ::

    class MyClass:
        pass


    register("MyClass", MyClass)
    # Registry:
    # {
    #   'MyClass': [path.to.MyClass],
    #   'path.to.MyClass': [path.to.MyClass],
    # }

.c              3  >   >#    U H  oR                   T:H  v   M     g 7fN)
__module__).0eachmodules     R/var/www/html/shao/venv/lib/python3.13/site-packages/marshmallow/class_registry.py	<genexpr>register.<locals>.<genexpr>9   s      *.Bd6!.Bs   N)r
   	_registryanyappend
setdefault)	classnameclsfullpathr   s      @r   registerr      s    ( ^^F 9+&H Ic *.7	.B* ' ' 	)##C(	)	# #u	) y Xr*11#6  #e	(    .)allc                   g r	    r   r   s     r   	get_classr   H   s    RUr   c                   g r	   r   r   s     r   r   r   L   s     r   Fc                    [         U    n[        U5      S:  a   U(       a	  [         U    $ [        SU < S35      e[         U    S   $ ! [         a  n[        SU < S35      UeSnAff = f)zRetrieve a class from the registry.

:raises: `marshmallow.exceptions.RegistryError` if the class cannot be found
    or if there are multiple entries for the given class name.
zClass with name z1 was not found. You may need to import the class.N   zMultiple classes with name z8 were found. Please use the full, module-qualified path.r   )r   KeyErrorr   len)r   r   classeserrors       r   r   r   R   s    I& 7|aY'')) 7% %
 	

 Y""  ym ,# #
 	s   	A 
A&A!!A&)r   strr   
SchemaTypereturnNone)r   r&   r   ztyping.Literal[False]r(   r'   )r   r&   r   ztyping.Literal[True]r(   zlist[SchemaType])r   r&   r   boolr(   zlist[SchemaType] | SchemaType)__doc__
__future__r   typingmarshmallow.exceptionsr   TYPE_CHECKINGmarshmallowr   typer'   r   r   overloadr   r   r   r   <module>r3      s    #  0	"fJ 	'$T >A U  U 360 
 .3 # #r   