
    go                      S SK Jr  S SKrS SKrS SKrS SKrS SKrS SKrS SKrS SK	r	S SK
r
S SKrS SKrS SKJr  SSKJrJrJr  SSKJrJrJrJrJrJr  SSKJrJrJrJr  \R>                  r Sr!S	r"S
r#\RH                  " 0 5      r%\" 5       r&\RN                  " \RP                  \RR                  5      r* " S S\RV                  5      r,\,RZ                  r-  " S S\.5      r/\-SSSSSSSSSSSSSS4S jr0SPS jr1SQS jr2S r3\3" S/ SQ5      r4S r5S r6S r7S r8S r9S r:S r;S r<S r= " S  S!5      r>S" r?S# r@ SRS$ jrA                        SSS% jrB\BrC S& rDS' rES( rFS) rGS* rHS+ rIS, rJSQS- jrKS. rLSTS/ jrMS0 rNS1 rOS2 r)S3 rPS4 rQSUS5 jrR          SVS7 jrSSWS8 jrT          SVS9 jrU      SXS: jrV                          SYS; jrWSZS< jrX " S= S>5      rY\YR                   V s/ s H  n \Y" U \-SSSSSU S?:g  SS\X" U 5      S@9PM     sn r[\G" \K" \M" \Y\[SA9\[ Vs/ s H  oR                  SB:w  d  M  UPM     snSA9\[ Vs/ s H)  oR                  (       d  M  UR                  SB:w  d  M'  UPM+     snSA9rY " SC SD5      r^\K" \M" \^5      5      r^ " SE SF5      r_\_R                   V s/ s H  n \Y" U \-SSSSSSSSSG9
PM     sn r`\G" \K" \M" \_\`SA9\`SA9\`SA9r_ " SH S65      raSI V s/ s H  n \Y" U \-SSSSSSSSSG9
PM     sn r`\G" \K" \M" \a\`SA9\`SA9\`SA9ra\4S4SJ jrb\B" SSSK9 " SL SM5      5       rcSN rdSO r'gs  sn f s  snf s  snf s  sn f s  sn f )[    )annotationsN)
itemgetter   )_compat_configsetters)PY_3_10_PLUSPY_3_11_PLUSPY_3_13_PLUS_AnnotationExtractor_get_annotationsget_generic_base)DefaultAlreadySetErrorFrozenInstanceErrorNotAnAttrsClassErrorUnannotatedAttributeErrorz__attr_factory_%s)ztyping.ClassVarz
t.ClassVarClassVarztyping_extensions.ClassVar_attrs_cached_hashc                  F    \ rS rSrSr\R                  " 5       rS rS r	Sr
g)_Nothing<   a.  
Sentinel to indicate the lack of a value when `None` is ambiguous.

If extending attrs, you can use ``typing.Literal[NOTHING]`` to show
that a value may be ``NOTHING``.

.. versionchanged:: 21.1.0 ``bool(NOTHING)`` is now False.
.. versionchanged:: 22.2.0 ``NOTHING`` is now an ``enum.Enum`` variant.
c                    g)NNOTHING selfs    R/Users/Alptekin/Desktop/izin_takip/venv/lib/python3.13/site-packages/attr/_make.py__repr___Nothing.__repr__I   s        c                    g)NFr   r   s    r   __bool___Nothing.__bool__L   s    r    r   N)__name__
__module____qualname____firstlineno____doc__enumautor   r   r"   __static_attributes__r   r    r   r   r   <   s     iikGr    r   c                  2    \ rS rSrSr\" S5      S4S jrSrg)_CacheHashWrapperX   ac  
An integer subclass that pickles / copies as None

This is used for non-slots classes with ``cache_hash=True``, to avoid
serializing a potentially (even likely) invalid hash value. Since `None`
is the default value for uncalculated hashes, whenever this is copied,
the copy's value for the hash should automatically reset.

See GH #613 for more details.
Nr   c                    X4$ Nr   )r   _none_constructor_argss      r   
__reduce___CacheHashWrapper.__reduce__d   s     ''r    )r$   r%   r&   r'   r(   typer3   r+   r   r    r   r-   r-   X   s    	 ,0:R (r    r-   TFc                Z   [        X;US5      u  pnnUb  USLa  USLa  Sn[        U5      eU	b>  U [        La  Sn[        U5      e[	        U	5      (       d  Sn[        U5      e[        U	5      n Uc  0 n[        U[        [        45      (       a  [        R                  " U6 nU(       a#  [        U[        [        45      (       a  [        U6 nU(       a#  [        U[        [        45      (       a  [        U6 n[        S0 SU _SU_S	U_S
S_SU_SU_SU_SU_SU_SU
_SU_SU_SU_SU_SU_SU_6$ )aC  
Create a new field / attribute on a class.

Identical to `attrs.field`, except it's not keyword-only.

Consider using `attrs.field` in new code (``attr.ib`` will *never* go away,
though).

..  warning::

    Does **nothing** unless the class is also decorated with
    `attr.s` (or similar)!


.. versionadded:: 15.2.0 *convert*
.. versionadded:: 16.3.0 *metadata*
.. versionchanged:: 17.1.0 *validator* can be a ``list`` now.
.. versionchanged:: 17.1.0
   *hash* is `None` and therefore mirrors *eq* by default.
.. versionadded:: 17.3.0 *type*
.. deprecated:: 17.4.0 *convert*
.. versionadded:: 17.4.0
   *converter* as a replacement for the deprecated *convert* to achieve
   consistency with other noun-based arguments.
.. versionadded:: 18.1.0
   ``factory=f`` is syntactic sugar for ``default=attr.Factory(f)``.
.. versionadded:: 18.2.0 *kw_only*
.. versionchanged:: 19.2.0 *convert* keyword argument removed.
.. versionchanged:: 19.2.0 *repr* also accepts a custom callable.
.. deprecated:: 19.2.0 *cmp* Removal on or after 2021-06-01.
.. versionadded:: 19.2.0 *eq* and *order*
.. versionadded:: 20.1.0 *on_setattr*
.. versionchanged:: 20.3.0 *kw_only* backported to Python 2
.. versionchanged:: 21.1.0
   *eq*, *order*, and *cmp* also accept a custom callable
.. versionchanged:: 21.1.0 *cmp* undeprecated
.. versionadded:: 22.2.0 *alias*
TNF6Invalid value for hash.  Must be True, False, or None.z=The `default` and `factory` arguments are mutually exclusive.z*The `factory` argument must be a callable.default	validatorreprcmphashinit	convertermetadatar5   kw_onlyeqeq_keyorder	order_key
on_setattraliasr   )_determine_attrib_eq_order	TypeErrorr   
ValueErrorcallableFactory
isinstancelisttupler   pipeand__CountingAttr)r8   r9   r:   r;   r<   r=   r?   r5   r>   factoryr@   rA   rC   rE   rF   rB   rD   msgs                     r   attribrT   h   s   n $>$ By D,U1BFn'!O  S/!  >CS/!'" *tUm,,\\:.
Z	D%=99)$	Z	D%=99)$	   	
             ! r    c                4    [        XS5      n[        XAU5        g)zO
Evaluate the script with the given global (globs) and local (locs)
variables.
execN)compileeval)scriptglobslocsfilenamebytecodes        r   _compile_and_evalr^      s    
 v0H$r    c                    Uc  0 OUnSnUn [        U5      SUR                  S5      U4n[        R                  R	                  X(5      n	X:X  a  OUSS  SU S3nUS-  nMU  [        XXR5        XP   $ )zG
Create the method with the script given and return the method object.
Nr   T->)len
splitlines	linecachecache
setdefaultr^   )
namerY   r\   rZ   localsr[   countbase_filenamelinecache_tupleold_vals
             r   _make_methodrn      s     2VD EM
Kd#	
 //,,XG%#CR()5'3
  fT4:r    c                    U  S3nSU S3S/nU(       a-  [        U5       H  u  pEUR                  SU SU S35        M     OUR                  S5        [        [        S	.n[	        S
R                  U5      U5        Xb   $ )z
Create a tuple subclass to hold `Attribute`s for an `attrs` class.

The subclass is a bare tuple with properties for names.

class MyClassAttributes(tuple):
    __slots__ = ()
    x = property(itemgetter(0))

Attributeszclass z(tuple):z    __slots__ = ()    z% = _attrs_property(_attrs_itemgetter())z    pass)_attrs_itemgetter_attrs_property
)	enumerateappendr   propertyr^   join)cls_name
attr_namesattr_class_nameattr_class_templatei	attr_namerZ   s          r   _make_attr_tuple_classr      s     "
*-O
!* %j1LA&&yk!FqcL 2
 	"":.",JEdii 34e<!!r    _Attributes)attrs
base_attrsbase_attrs_mapc                    [        U 5      n U R                  S5      (       a  U R                  S5      (       a  U SS n U R                  [        5      $ )z
Check whether *annot* is a typing.ClassVar.

The string comparison hack is used to avoid evaluating all string
annotations which would put attrs-based classes at a performance
disadvantage compared to plain old classes.
)'"r   r`   )str
startswithendswith_CLASSVAR_PREFIXES)annots    r   _is_class_varr   #  sK     JE 
##z(B(Ba.//r    c                    XR                   ;   $ )zJ
Check whether *cls* defines *attrib_name* (and doesn't just inherit it).
)__dict__)clsattrib_names     r   _has_own_attributer   4  s     ,,&&r    c                   / n0 n[        U R                  SS 5       Hh  n[        US/ 5       HT  nUR                  (       d  UR                  U;   a  M&  UR                  SS9nUR                  U5        XCUR                  '   MV     Mj     / n[        5       n[        U5       HB  nUR                  U;   a  M  UR                  SU5        UR                  UR                  5        MD     Xc4$ )zI
Collect attr.ibs from base classes of *cls*, except *taken_attr_names*.
r   r`   __attrs_attrs__T	inheritedr   )
reversed__mro__getattrr   rh   evolverw   setinsertadd)r   taken_attr_namesr   base_attr_mapbase_clsafilteredseens           r   _collect_base_attrsr   ;  s     JM S[[2./#4b9A{{aff(884(Aa $,!&&! : 0 H5Dj!66T>1	 " ""r    c                   / n0 nU R                   SS  Hr  n[        US/ 5       H^  nUR                  U;   a  M  UR                  SS9nUR	                  UR                  5        UR                  U5        XCUR                  '   M`     Mt     X#4$ )a  
Collect attr.ibs from base classes of *cls*, except *taken_attr_names*.

N.B. *taken_attr_names* will be mutated.

Adhere to the old incorrect behavior.

Notably it collects from the front and considers inherited attributes which
leads to the buggy behavior reported in #428.
r   r`   r   Tr   )r   r   rh   r   r   rw   )r   r   r   r   r   r   s         r   _collect_base_attrs_brokenr   Z  s     JM KK"%#4b9Avv))4(A  (a $,!&&! : & $$r    c                  ^ U R                   m[        U 5      nUb  [        UR                  5       5      nGOBUSL Ga  TR                  5        VV	s1 s H  u  p[	        U	[
        5      (       d  M  UiM      n
nn	/ n[        5       nUR                  5        H  u  p[        U5      (       a  M  UR                  U5        TR                  U[        5      n[	        U[
        5      (       d  U[        L a
  [        5       O[        US9nUR                  X45        M     X-
  n[        U5      S:  a,  [        SSR                  [!        UU4S jS95      -   S-   5      eO [!        S	 TR                  5        5       S
 S9nU VVs/ s H*  u  nn["        R%                  UUUR                  U5      S9PM,     nnnU(       a*  ['        U U Vs1 s H  oR(                  iM     sn5      u  nnO)[+        U U Vs1 s H  oR(                  iM     sn5      u  nnU(       a<  U Vs/ s H  oR-                  SS9PM     nnU Vs/ s H  oR-                  SS9PM     nnUU-   nSnS U 5        HJ  nUSL a$  UR.                  [        L a  SU< 3n[1        U5      eUSL d  M3  UR.                  [        Ld  MH  SnML     Ub	  U" U U5      nU Vs/ s H8  nUR2                  (       d"  UR-                  [5        UR(                  5      S9OUPM:     nnU Vs/ s H  oR(                  PM     nn[7        U R8                  U5      n[;        U" U5      UU45      $ s  sn	nf s  snnf s  snf s  snf s  snf s  snf s  snf s  snf )a  
Transform all `_CountingAttr`s on a class into `Attribute`s.

If *these* is passed, use that and don't look for them on the class.

If *collect_by_mro* is True, collect them in the correct MRO order,
otherwise use the old -- incorrect -- order.  See #428.

Return an `_Attributes`.
Tr8   r   z1The following `attr.ib`s lack a type annotation: , c                :   > TR                  U 5      R                  $ r0   )getcounter)ncds    r   <lambda>"_transform_attrs.<locals>.<lambda>  s    bffQi6G6Gr    )key.c              3  Z   #    U  H!  u  p[        U[        5      (       d  M  X4v   M#     g 7fr0   )rL   rQ   ).0rh   attrs      r   	<genexpr>#_transform_attrs.<locals>.<genexpr>  s'      ",JDdM2 ",s   +
+c                     U S   R                   $ Nr   )r   )es    r   r   r     s    !A$,,r    )rh   car5   )r@   Fc              3  h   #    U  H(  oR                   S Ld  M  UR                  S L d  M$  Uv   M*     g7f)FN)r=   r@   r   r   s     r   r   r     s(     MA&&"5a!))u:Laas   22	2zlNo mandatory attributes allowed after an attribute with a default value or factory.  Attribute in question: )rF   )r   r   rM   itemsrL   rQ   r   r   r   r   r   rT   rw   rc   r   ry   sorted	Attributefrom_counting_attrr   rh   r   r   r8   rI   rF   _default_init_alias_forr   r$   r   )r   theseauto_attribsr@   collect_by_mrofield_transformerannsca_listrh   r   ca_namesannot_namesr   r5   r   unannotatedr   	own_attrsr   r   r   had_defaultrS   r{   
AttrsClassr   s                            @r   _transform_attrsr   v  se    
BC Du{{}%		 !hhj
(
$. ( 	 

 e#zz|OIT""OOI&y'*Aa// !WFH&2CNNI>*  , ,{a+C));,GH 	    "$((*
 '
 %	 %MIr 	$$r(; 	% 	
 %	   $7),)Q&&),%
!
M %?),)Q&&),%
!
M 5>?YXXdX+Y	?6@Ajhhth,j
A"E KMM$199#7 A  BC  AF  GCS/!%AIIW$<K N $!#u- A @Aww.qvv67AM 
  #((%Q&&%J('jAJ
5):}EFFo
H - - @A. )s6   M/M>1M	M
-M
M5M=?M#M(c                    / SQnUb  UR                  S5        OUR                  / SQ5        UR                  SS/5        [        US5      nU [        R                  US.n[        SS	R                  U5      UUS
U0S9$ )N)	zdef wrapper(_cls):z    __class__ = _clsz    def __getattr__(self, item, cached_properties=cached_properties, original_getattr=original_getattr, _cached_setattr_get=_cached_setattr_get):z+         func = cached_properties.get(item)z         if func is not None:z!              result = func(self)z1              _setter = _cached_setattr_get(self)z#              _setter(item, result)z              return resultz,         return original_getattr(self, item))z         try:z2             return super().__getattribute__(item)z         except AttributeError:z4             if not hasattr(super(), '__getattr__'):z                 raisez-             return super().__getattr__(item)zY         original_error = f"'{self.__class__.__name__}' object has no attribute '{item}'"z-         raise AttributeError(original_error)z    return __getattr__z__getattr__ = wrapper(_cls)r   )cached_properties_cached_setattr_getoriginal_getattr__getattr__ru   _cls)ri   )rw   extend_generate_unique_filename_OBJ_SETATTR__get__rn   ry   )r   r   r   linesunique_filenameglobs         r   _make_cached_property_getattrr     s    E #:	
 			
 
LL$)	
 0Y?O /+33,D 		%C
 r    c                r    [        U [        5      (       a  US;   a  [        R                  XU5        g[        e)z,
Attached to frozen classes as __setattr__.
)	__cause____context____traceback____suppress_context__	__notes__N)rL   BaseException__setattr__r   r   rh   values      r   _frozen_setattrsr     s8     $&&4 4 , 	!!$e4
r    c                p    [        U [        5      (       a  US;   a  [        R                  X5        g[        e)z,
Attached to frozen classes as __delattr__.
)r   N)rL   r   __delattr__r   )r   rh   s     r   _frozen_delattrsr   .  s/     $&&4>+A!!$-
r    c                 ,    U u  nUR                  n[	        U5      nU HB  nUR
                  (       d  M  UR                  nUR                  nX;  d  M5  [        X'5      X'   MD     U" S0 UD6$ ! [          a    S[        U 5       S3n[        U5      Sef = f)a  
Create a new instance, based on the first positional argument with
*changes* applied.

.. tip::

   On Python 3.13 and later, you can also use `copy.replace` instead.

Args:

    inst:
        Instance of a class with *attrs* attributes. *inst* must be passed
        as a positional argument.

    changes:
        Keyword changes in the new copy.

Returns:
    A copy of inst with *changes* incorporated.

Raises:
    TypeError:
        If *attr_name* couldn't be found in the class ``__init__``.

    attrs.exceptions.NotAnAttrsClassError:
        If *cls* is not an *attrs* class.

.. versionadded:: 17.1.0
.. deprecated:: 23.1.0
   It is now deprecated to pass the instance using the keyword argument
   *inst*. It will raise a warning until at least April 2024, after which
   it will become an error. Always pass the instance as a positional
   argument.
.. versionchanged:: 24.1.0
   *inst* can't be passed as a keyword argument anymore.
z*evolve() takes 1 positional argument, but z were givenNr   )	rI   rc   rH   	__class__fieldsr=   rh   rF   r   )	argschangesinstrS   r   r   r   r   	init_names	            r   r   r   9  s    J' ..C3KEvvFF	GG	#!(!9G  >>!  '8T;O 	 n$&	's   A- -&Bc                      \ rS rSrSrSrS rS rS rS r	S r
S	 rS
 rS rS rS rS rS rS rS rS rS rS rS rSrg)_ClassBuilderis  z 
Iteratively build *one* class.
)_attr_names_attrs_base_attr_map_base_names_cache_hashr   	_cls_dict_delete_attribs_frozen_has_custom_setattr_has_post_init_has_pre_init_is_exc_on_setattr_pre_init_has_args_slots_weakref_slot_wrote_own_setattrc                6   [        UUUUUU5      u  nnnXl        U(       a  [        UR                  5      O0 U l        Xl        U Vs1 s H  nUR                  iM     snU l        UU l        [        S U 5       5      U l
        X0l        X@l        XPl        Xl        [        [!        USS5      5      U l        SU l        U R"                  (       a?  UR&                  n[(        R*                  " U5      n[-        UR.                  5      S:  U l        [        [!        USS5      5      U l        [        U5      (       + U l        Xl        Xl        Xl        SU l        U R
                  U R                  S'   U(       a.  [<        U R                  S'   [>        U R                  S'   S	U l        OU[@        [B        RD                  [B        RF                  4;   a  S=nnU H3  nURH                  b  S	nURJ                  b  S	nU(       d  M*  U(       d  M3    O   U[@        :X  a  U(       d  U(       a6  U[B        RD                  :X  a  U(       a  U[B        RF                  :X  a  U(       d  S U l        U(       a.  U RM                  5       u  U R                  S
'   U R                  S'   g g s  snf )Nc              3  8   #    U  H  oR                   v   M     g 7fr0   rh   r   s     r   r   )_ClassBuilder.__init__.<locals>.<genexpr>  s      7As   __attrs_pre_init__Fr   __attrs_post_init__r   r   r   T__getstate____setstate__)'r   r   dictr   r   r   rh   r   r   rN   r   r  r   r  r   boolr   r   r  r
  inspect	signaturerc   
parametersr   r   r   r  r   r  r   r   _DEFAULT_ON_SETATTRr   validateconvertr9   r>   _make_getstate_setstate)r   r   r   slotsfrozenweakref_slotgetstate_setstater   r@   
cache_hashis_excr   rE   has_custom_setattrr   r   r   base_mapr   pre_init_funcpre_init_signaturehas_validatorhas_converters                          r   __init___ClassBuilder.__init__  s;   " '7'
#z8 	/4cll+",67JqAFFJ7&  7 77)%!'#/CU"KL"'  22M!(!2!2=!A&)*<*G*G&H1&LD#"730Eu#MN#';%#5 "',0KK(),<DNN=),<DNN=)&*D#OO
 

 -21MM;;*$(M;;*$(M =]]  "55*m'"2"22='//1-
 $(  ,,.~.~. s 8s   Jc                6    SU R                   R                   S3$ )Nz<_ClassBuilder(cls=z)>)r   r$   r   s    r   r   _ClassBuilder.__repr__  s    $TYY%7%7$8;;r    c                   U R                   SL a  U R                  5       nO1U R                  5       n[        (       a  [        R
                  " U5      n[        USS5      (       a   SUR                  ;  a  UR                  5         U$ )zk
Finalize class based on the accumulated configuration.

Builder cannot be used after calling this method.
T__attrs_init_subclass__N)	r  _create_slots_class_patch_original_classr	   abcupdate_abstractmethodsr   r   r(  )r   r   s     r   build_class_ClassBuilder.build_class  sp     ;;$**,C,,.C|005
 C2D99)='')
r    c                (   U R                   nU R                  nU R                  (       aa  U R                   HQ  nX2;  d  M
  [	        X[
        5      [
        Ld  M#  [        R                  " [        5         [        X5        SSS5        MS     U R                  R                  5        H  u  p4[        XU5        M     U R                  (       d5  [	        USS5      (       a#  SUl        U R                  (       d  [         Ul        U$ ! , (       d  f       M  = f)z1
Apply accumulated methods and return the class.
N__attrs_own_setattr__F)r   r   r   r   r   	_SENTINEL
contextlibsuppressAttributeErrordelattrr   r   setattrr  r0  r   r   r   )r   r   
base_namesrh   r   s        r   r*  #_ClassBuilder._patch_original_class  s     ii%%
 ((*95YF
 $,,^<* =< )  >>//1KDCu% 2
 &&7(%,
 ,
 ).C%++".
# =<s   3D
D	c                	   U R                   R                  5        VVs0 s H)  u  pU/ [        U R                  5      QSPSP7;  d  M'  X_M+     nnnU R                  (       d_  SUS'   U R
                  (       dI  U R                  R                   H/  nUR                  R                  SS5      (       d  M&  [        US'     O   0 nSnU R                  R                  SS  HY  nUR                  R                  SS5      b  S	nUR                  [        US
/ 5       Vs0 s H  nU[        XG5      _M     sn5        M[     [        U R                  5      nU R                  n	U R                   (       a-  S[        U R                  S
S5      ;  a  SU	;  a  U(       d  U	S-  n	UR                  5        VV
s0 s H2  u  pz[#        U
[$        R&                  5      (       d  M&  XzR(                  _M4     nnn
/ nU(       a  [+        U R                  5      nUR                  5        H`  u  p~X4-  n	X7	 UR-                  U5        [.        R0                  " U5      R2                  nU[.        R4                  R6                  Ld  M\  XU'   Mb     UR                  S5      nUb  UR-                  U5        [9        UUU R                  5      US'   U	 Vs/ s H  owU;  d  M
  UPM     nnUR                  5        VVs0 s H  u  nnUU;   d  M  UU_M     nnnU Vs/ s H  owU;  d  M
  UPM     nnUR                  U5        U R:                  (       a  UR-                  [<        5        [        U5      US
'   U R                  R>                  US'   [A        U R                  5      " U R                  RB                  U R                  R                  U5      n[D        RF                  " UR                  RI                  5       U5       H  n[#        U[J        [L        45      (       a  [        URN                  SS5      nO:[#        U[P        5      (       a  [        URR                  SS5      nO[        USS5      nU(       d  My  U H,  n URT                  U R                  L nU(       a	  UUl*        M,  M.     M     U$ s  snnf s  snf s  sn
nf s  snf s  snnf s  snf ! [V         a     Md  f = f)z<
Build and return a new class with a `__slots__` attribute.
r   __weakref__Fr0  r   r   r`   NT	__slots__r   )r:  r   r&   __closure__),r   r   rN   r   r  r   r   	__bases__r   r   r   r   updater   r   r   r  rL   	functoolscached_propertyfuncr   rw   r  r  return_annotation	Parameteremptyr   r   _HASH_CACHE_FIELDr&   r5   r$   	itertoolschainvaluesclassmethodstaticmethod__func__rx   fgetcell_contentsrI   )r   kvr   r   existing_slotsweakref_inheritedrh   r7  namesr@  r   &additional_closure_functions_to_updateclass_annotationsrA  
annotationr   
slot_namesslotslot_descriptorreused_slotsr   itemclosure_cellscellmatchs                             r   r)  !_ClassBuilder._create_slots_class'  sm    ,,.
.M% 0 01M:M}MM AD. 	 
 &&*/B&'++ $		 3 3H((,,-DeLL,8=) !4 !		))!B/H  $$]D9E$(!!! !(+r B B '(11 B 0 ))*
  WTYYR%HHU*%%%E *,
)3%/9+D+DE 'D&&&)3 	 
 24. 0 ;/557
 H6==dC$..t4FF
W%6%6%<%<<.8d+ 8  "vvm4+6==>NO =!#3TYY!B} (-GutJ0Fdu
G *8)=)=)?
)?%oz! "D/!)? 	 

 (2Nzt5Mdz
N
		,/0
+;!YY33> 499odii00$))2E2ErJ OOLL!#I
D $l ;<< !(}d KD(++ !(		=$ G 'mT B %1 ..$));E
 -0*  &!
2 
K
>"
> H

 OJ " sS   &RRR#
-%R(R(>	R.R.&R37R3	R9R9+R>>
SSc                ~    U R                  [        U R                  XR                  5      5      U R                  S'   U $ )Nr   )_add_method_dunders
_make_reprr   r   r   )r   nss     r   add_repr_ClassBuilder.add_repr  s4    %)%=%=t{{B		2&
z" r    c                    U R                   R                  S5      nUc  Sn[        U5      eS nU R                  U5      U R                   S'   U $ )Nr   z3__str__ can only be generated if a __repr__ exists.c                "    U R                  5       $ r0   r   r   s    r   __str__&_ClassBuilder.add_str.<locals>.__str__  s    ==?"r    rh  )r   r   rI   r`  )r   r:   rS   rh  s       r   add_str_ClassBuilder.add_str  sO    ~~!!*-<GCS/!	# %)$<$<W$Ey!r    c                v   ^^ [        S U R                   5       5      mU4S jnU R                  mUU4S jnX4$ )z6
Create custom __setstate__ and __getstate__ methods.
c              3  4   #    U  H  oS :w  d  M
  Uv   M     g7f)r:  Nr   )r   ans     r   r   8_ClassBuilder._make_getstate_setstate.<locals>.<genexpr>  s      !
)2=-@BB)s   		c                F   > T Vs0 s H  o[        X5      _M     sn$ s  snf !
Automatically created by attrs.
r   )r   rh   state_attr_namess     r   slots_getstate=_ClassBuilder._make_getstate_setstate.<locals>.slots_getstate  s(     ;KK:J$'$--:JKKKs   c                   > [         R                  U 5      n[        U[        5      (       a  [	        TU5       H  u  p4U" X45        M     OT H  nX1;   d  M
  U" X1U   5        M     T(       a  U" [
        S5        gg)rr  N)r   r   rL   rN   ziprE  )r   state_ClassBuilder__bound_setattrrh   r   hash_caching_enabledrt  s        r   slots_setstate=_ClassBuilder._make_getstate_setstate.<locals>.slots_setstate  ss     +2248O%'' $''7#?KD#D0 $@ -D}'Dk: - $ 148 $r    )rN   r   r   )r   ru  r|  r{  rt  s      @@r   r  %_ClassBuilder._make_getstate_setstate  sG    
 ! !
))!
 
	L  $//	9, --r    c                $    S U R                   S'   U $ )N__hash__)r   r   s    r   make_unhashable_ClassBuilder.make_unhashable  s    %)z"r    c           	         U R                  [        U R                  U R                  U R                  U R
                  S95      U R                  S'   U $ )Nr  r  r  )r`  
_make_hashr   r   r   r   r   r   s    r   add_hash_ClassBuilder.add_hash  sH    %)%=%=		||++	&
z" r    c                B   U R                  [        U R                  U R                  U R                  U R
                  U R                  U R                  U R                  U R                  U R                  U R                  U R                  SS95      U R                  S'   U $ )NF
attrs_initr#  r`  
_make_initr   r   r   r  r   r   r  r   r   r   r  r   r   s    r   add_init_ClassBuilder.add_init  s    %)%=%=		""''##  ##   &
z"" r    c                D    U R                  S 5      U R                  S'   U $ )Nc                    [        U 40 UD6$ r0   )r   )r   r   s     r   r   +_ClassBuilder.add_replace.<locals>.<lambda>  s    F4$;7$;r    __replace__)r`  r   r   s    r   add_replace_ClassBuilder.add_replace  s%    (,(@(@;)
}% r    c                V    [        S U R                   5       5      U R                  S'   g )Nc              3     #    U  H7  nUR                   (       d  M  UR                  (       a  M)  UR                  v   M9     g 7fr0   )r=   r@   rh   )r   fields     r   r   /_ClassBuilder.add_match_args.<locals>.<genexpr>  s0      1
$zz "'-- EJJ$s   AAA__match_args__)rN   r   r   r   s    r   add_match_args_ClassBuilder.add_match_args  s'    +0 1
1
 ,
'(r    c                B   U R                  [        U R                  U R                  U R                  U R
                  U R                  U R                  U R                  U R                  U R                  U R                  U R                  SS95      U R                  S'   U $ )NTr  __attrs_init__r  r   s    r   add_attrs_init_ClassBuilder.add_attrs_init  s    +/+C+C		""''##  ##  ,
'(" r    c                    U R                   nU R                  [        U R                  U R                  5      5      US'   U R                  [        5       5      US'   U $ )N__eq____ne__)r   r`  _make_eqr   r   _make_ner   r   s     r   add_eq_ClassBuilder.add_eq2  sN    ^^//TYY,
8 //
;8r    c                   ^  T R                   nU 4S j[        T R                  T R                  5       5       u  US'   US'   US'   US'   T $ )Nc              3  F   >#    U  H  nTR                  U5      v   M     g 7fr0   )r`  )r   methr   s     r   r   *_ClassBuilder.add_order.<locals>.<genexpr>?  s'      B
; $$T**;s   !__lt____le____gt____ge__)r   _make_orderr   r   r  s   ` r   	add_order_ClassBuilder.add_order<  sL    ^^B
#DIIt{{;B
>8blBxL"X,
 r    c                  ^ U R                   (       a  U $ 0 mU R                   HP  nUR                  =(       d    U R                  nU(       d  M+  U[        R
                  Ld  M@  X4TUR                  '   MR     T(       d  U $ U R                  (       a  Sn[        U5      eU4S jnSU R                  S'   U R                  U5      U R                  S'   SU l        U $ )Nz7Can't combine custom __setattr__ with on_setattr hooks.c                d   >  TU   u  p4U" XU5      n[        XU5        g ! [          a    Un Nf = fr0   )KeyErrorr   )r   rh   valr   hooknvalsa_attrss         r   r   ._ClassBuilder.add_setattr.<locals>.__setattr__Y  sA    *"4. DS)T*  s     //Tr0  r   )r   r   rE   r  r   NO_OPrh   r   rI   r   r`  r  )r   r   rE   rS   r   r  s        @r   add_setattr_ClassBuilder.add_setattrF  s    <<KA9)9)9Jzj=#$=  
 K##KCS/!	+ 37./(,(@(@(M}%"&r    c                   [         R                  " [        5         U R                  R                  Ul        SSS5        [         R                  " [        5         U R                  R
                   SUR                   3Ul        SSS5        [         R                  " [        5         SU R                  R
                   S3Ul        SSS5        U$ ! , (       d  f       N= f! , (       d  f       Nc= f! , (       d  f       U$ = f)z<
Add __module__ and __qualname__ to a *method* if possible.
Nr   z$Method generated by attrs for class )r2  r3  r4  r   r%   r&   r$   r(   )r   methods     r   r`  !_ClassBuilder._add_method_dundersi  s       0 $		 4 4F 1   0%)YY%;%;$<Afoo=N"OF 1   0699))*!- N 1  10 10 10 s#   C+C!& C2
C!
C/2
DN)r$   r%   r&   r'   r(   r;  r#  r   r-  r*  r)  rc  rj  r  r  r  r  r  r  r  r  r  r  r`  r+   r   r    r   r   r   s  so    I*Z/x<."HIV
'.R
(
(!Fr    r   c                    U b#  [        USLUSL45      (       a  Sn[        U5      eU b  X 4$ Uc  UnUc  UnUSL a  USL a  Sn[        U5      eX4$ )
Validate the combination of *cmp*, *eq*, and *order*. Derive the effective
values of eq and order.  If *eq* is None, set it to *default_eq*.
N&Don't mix `cmp` with `eq' and `order`.FT-`order` can only be True if `eq` is True too.anyrI   )r;   rA   rC   
default_eqrS   s        r   _determine_attrs_eq_orderr  |  sx    
 3$T0ABCC6o x 
z}	U{u}=o9r    c                    U b#  [        USLUSL45      (       a  Sn[        U5      eS nU b  U" U 5      u  pXX4$ Uc  USpqO
U" U5      u  pUc  XpO
U" U5      u  p(USL a  USL a  Sn[        U5      eXX(4$ )r  Nr  c                8    [        U 5      (       a  SU pX4$ SnX4$ )z(
Decide whether a key function is used.
TN)rJ   )r   r   s     r   decide_callable_or_boolean>_determine_attrib_eq_order.<locals>.decide_callable_or_boolean  s-     E??u3 z Czr    FTr  r  )	r;   rA   rC   r  rS   r  cmp_keyrB   rD   s	            r   rG   rG     s    
 3$T0ABCC6o 1#6S)) 
zF/3
}y5e<	U{u}=ou''r    c                h    USL d  USL a  U$ Uc  USL a  U$ U H  n[        X5      (       d  M    g   U$ )aX  
Check whether we should implement a set of methods for *cls*.

*flag* is the argument passed into @attr.s like 'init', *auto_detect* the
same as passed into @attr.s and *dunders* is a tuple of attribute names
whose presence signal that the user has implemented it themselves.

Return *default* if no reason for either for or against is found.
TF)r   )r   flagauto_detectdundersr8   dunders         r   _determine_whether_to_implementr    sH     t|tu}|u, c**  Nr    c                @  ^^^^^^^^	^
^^^^^^^^^^^^ Tb  SSK nUR                  [        S5      SS9  [        XOUS5      u  mmUb  Um[	        T[
        [        45      (       a  [        R                  " T6 mUUUUUUUUUUUUUUUUUUU
UU	4S jnU c  U$ U" U 5      $ )a  
A class decorator that adds :term:`dunder methods` according to the
specified attributes using `attr.ib` or the *these* argument.

Consider using `attrs.define` / `attrs.frozen` in new code (``attr.s`` will
*never* go away, though).

Args:
    repr_ns (str):
        When using nested classes, there was no way in Python 2 to
        automatically detect that.  This argument allows to set a custom
        name for a more meaningful ``repr`` output.  This argument is
        pointless in Python 3 and is therefore deprecated.

.. caution::
    Refer to `attrs.define` for the rest of the parameters, but note that they
    can have different defaults.

    Notably, leaving *on_setattr* as `None` will **not** add any hooks.

.. versionadded:: 16.0.0 *slots*
.. versionadded:: 16.1.0 *frozen*
.. versionadded:: 16.3.0 *str*
.. versionadded:: 16.3.0 Support for ``__attrs_post_init__``.
.. versionchanged:: 17.1.0
   *hash* supports `None` as value which is also the default now.
.. versionadded:: 17.3.0 *auto_attribs*
.. versionchanged:: 18.1.0
   If *these* is passed, no attributes are deleted from the class body.
.. versionchanged:: 18.1.0 If *these* is ordered, the order is retained.
.. versionadded:: 18.2.0 *weakref_slot*
.. deprecated:: 18.2.0
   ``__lt__``, ``__le__``, ``__gt__``, and ``__ge__`` now raise a
   `DeprecationWarning` if the classes compared are subclasses of
   each other. ``__eq`` and ``__ne__`` never tried to compared subclasses
   to each other.
.. versionchanged:: 19.2.0
   ``__lt__``, ``__le__``, ``__gt__``, and ``__ge__`` now do not consider
   subclasses comparable anymore.
.. versionadded:: 18.2.0 *kw_only*
.. versionadded:: 18.2.0 *cache_hash*
.. versionadded:: 19.1.0 *auto_exc*
.. deprecated:: 19.2.0 *cmp* Removal on or after 2021-06-01.
.. versionadded:: 19.2.0 *eq* and *order*
.. versionadded:: 20.1.0 *auto_detect*
.. versionadded:: 20.1.0 *collect_by_mro*
.. versionadded:: 20.1.0 *getstate_setstate*
.. versionadded:: 20.1.0 *on_setattr*
.. versionadded:: 20.3.0 *field_transformer*
.. versionchanged:: 21.1.0
   ``init=False`` injects ``__attrs_init__``
.. versionchanged:: 21.1.0 Support for ``__attrs_pre_init__``
.. versionchanged:: 21.1.0 *cmp* undeprecated
.. versionadded:: 21.3.0 *match_args*
.. versionadded:: 22.2.0
   *unsafe_hash* as an alias for *hash* (for :pep:`681` compliance).
.. deprecated:: 24.1.0 *repr_ns*
.. versionchanged:: 24.1.0
   Instances are not compared as tuples of attributes anymore, but using a
   big ``and`` condition. This is faster and has more correct behavior for
   uncomparable values like `math.nan`.
.. versionadded:: 24.1.0
   If a class has an *inherited* classmethod called
   ``__attrs_init_subclass__``, it is executed after the class is created.
.. deprecated:: 24.1.0 *hash* is deprecated in favor of *unsafe_hash*.
Nr   zQThe `repr_ns` argument is deprecated and will be removed in or after August 2025.   )
stacklevelc                  > T=(       d    [        U 5      nT	SL =(       a    [        U [        5      nT=(       a    [        U S5      nU(       a  U(       a  Sn[	        U5      e[        U TTUT[        U TTSTS9TTT
UTTUT5      n[        U TTS5      (       a  UR                  T5        TSL a  UR                  5         [        U TTS5      nU(       d  USL a  UR                  5         U(       d#  [        U TTS5      (       a  UR                  5         UR                  5         Tc  TSL a  [        U S	5      (       a  S
mTSLa  TS
La  Tb  Sn[        U5      eTS
L d  Tc  US
L d  U(       a  T
(       a  Sn[        U5      eOGTSL d  Tc  USL a  USL a  UR                  5         O$T
(       a  Sn[        U5      eUR                  5         [        U TTS5      (       a  UR                  5         O$UR!                  5         T
(       a  Sn[        U5      e["        (       a!  [        U S5      (       d  UR%                  5         [&        (       a(  T(       a!  [        U S5      (       d  UR)                  5         UR+                  5       $ )NTr   z/Can't freeze a class with a custom __setattr__.)r  r  r   rg  )r  r  )r  r  r  r  r  Fr7   zlInvalid value for cache_hash.  To use hash caching, hashing must be either explicitly or implicitly enabled.r#  zFInvalid value for cache_hash.  To use hash caching, init must be True.r  r  )_has_frozen_base_class
issubclassr   r   rI   r   r  rc  rj  r  r  r  rH   r  r  r  r  r   r  r	   r  r-  )r   	is_frozenr  has_own_setattrrS   builderrA   r   r  auto_excr  r   eq_r   r  r  r<   r=   r@   
match_argsrE   order_r:   repr_nsr  r   r   r  s          r   wrapattrs.<locals>.wrapL  s   94S9	T!Djm&D% 
*<+
 yCCS/!+!0 )
, +{M
 
 W%$;OO,k#7
 "*NN9&N
 
  Lt#"3
33DtE 1d6FJCC. 5=T\bEkf  En$  T\LR4ZI,=   En$##%*{M
 
 ""$^n$< 23 F F! L&s,<==""$""$$r    )	warningswarnDeprecationWarningr  rL   rM   rN   r   rO   )	maybe_clsr   r  r:   r;   r<   r=   r  r  r  r   r   r@   r  r  rA   rC   r  r   r  rE   r   r  unsafe_hashr  r  r  r  s    ``` ``````````  ``````   @@r   r   r     s    x c 	 	 	
 ,CUDAKC *tUm,,\\:.
g% g% g% g%V 	?r    c                &    U R                   [        L $ )zJ
Check whether *cls* has a frozen ancestor by looking at its
__setattr__.
)r   r   )r   s    r   r  r    s    
 ??...r    c           
     X    SU SU R                    S[        U SU R                  5       S3$ )z>
Create a "filename" suitable for a function being generated.
z<attrs generated  r   r&   rb   )r%   r   r$   )r   	func_names     r   r   r     s7    
 I;a'7q35
6a	9r    c                ,  ^^	^
^^^ [        S T 5       5      mSn[        U S5      n[        U5      m0 m
SnSmSm	U(       d  US-  nOUS-  nUS	-  nS
T-   mT	S-  m	U/mUU	U
UUU4S jnU(       a  TR                  US[         S3-   5        U(       a,  U" S[         S3US-  5        TR                  US-  S-   5        OU" S[         S3US-  5        TR                  US[         3-   5        O	U" SU5        SR                  T5      n[        SXT
5      $ )Nc              3     #    U  H5  oR                   S L d   UR                   b  M   UR                  S L d  M1  Uv   M7     g7f)TN)r<   rA   r   s     r   r   _make_hash.<locals>.<genexpr>  s/      aFFdNqvv!$$$,5s   ??	?        r<   zdef __hash__(selfzhash((rr   z):z, *zC, _cache_wrapper=__import__('attr._make')._make._CacheHashWrapper):z_cache_wrapper()c           	     v  > TR                  X-   T-   UST	 S3-   /5        T H|  nUR                  (       aF  SUR                   S3nUR                  TU'   TR                  USU SUR                   S3-   5        MZ  TR                  USUR                   S3-   5        M~     TR                  US-   T-   5        g	)
z
Generate the code for actually computing the hash code.
Below this will either be returned directly or used to compute
a value which is then cached, depending on the value of cache_hash
r  ,__key(self.z),        self.rq   N)r   rB   rh   rw   )
prefixindentr   cmp_namer   closing_bracesrZ   	hash_funcmethod_lines	type_hashs
       r   append_hash_computation_lines1_make_hash.<locals>.append_hash_computation_lines  s     	)+8I;a00	
 Axxqvvhd+"#((h##xzxrBB ##F}QVVHA-F$FG  	FVOn<=r    zif self.z	 is None:zobject.__setattr__(self, '', r  self. = zreturn self.zreturn ru   r  )rN   r   r<   rw   rE  ry   rn   )r   r   r  r  tabr   hash_defr   rY   r  rZ   r  r  r  s    `       @@@@@r   r  r    sM     E C/V<O_%IE"HINDEYY%	1	#:L> >4 CH->,?y"IIJ),->,?sCS1W a#.))*#.a 	CL1B0C"DDE%i5YY|$F
FUCCr    c                &    [        XSSS9U l        U $ )z
Add a hash method to *cls*.
Fr  )r  r  r   r   s     r   	_add_hashr	    s     c5ICLJr    c                     S n U $ )z
Create __ne__ method.
c                P    U R                  U5      nU[        L a  [        $ U(       + $ )zR
Check equality and either forward a NotImplemented or
return the result negated.
)r  NotImplemented)r   otherresults      r   r  _make_ne.<locals>.__ne__*  s(    
 U#^#!!zr    r   )r  s    r   r  r  %  s    
	 Mr    c                ~   U Vs/ s H  o"R                   (       d  M  UPM     nn[        U S5      n/ SQn0 nU(       a  UR                  S5        U H  nUR                  (       aQ  SUR                   S3nUR                  XV'   UR                  SU SUR                   SU S	UR                   S
3	5        O+UR                  SUR                   SUR                   35        X!S   Ld  M  US    S3US'   M     UR                  S5        OUR                  S5        SR                  U5      n[        SXsU5      $ s  snf )z.
Create __eq__ method for *cls* with *attrs*.
rA   )zdef __eq__(self, other):z-    if other.__class__ is not self.__class__:z        return NotImplementedz    return  (r  r  r  r  z) == z(other.r  r  z
 == other.r`   z andz    )z    return Trueru   r  )rA   r   rw   rB   rh   ry   rn   )r   r   r   r   r   rZ   r  rY   s           r   r  r  8  s&    &1QE&/T:OE E_%Axxqvvhd+ #$((xjqvvheH:WQVVHTUV }QVVHJqvvhGHb	!$Ryk.b	  	W&'YYuF&5AA? 's
   D:D:c                   ^^ T Vs/ s H  o"R                   (       d  M  UPM     snmU4S jmU4S jnU4S jnU4S jnU4S jnX4XV4$ s  snf )z1
Create ordering methods for *cls* with *attrs*.
c                >   >^  [        S U 4S jT 5        5       5      $ )z
Save us some typing.
c              3  H   #    U  H  u  pU(       a  U" U5      OUv   M     g 7fr0   r   )r   r   r   s      r   r   6_make_order.<locals>.attrs_to_tuple.<locals>.<genexpr>h  s(      

 CJ5(    "c              3  h   >#    U  H'  n[        TUR                  5      UR                  4v   M)     g 7fr0   )r   rh   rD   )r   r   objs     r   r   r  j  s(      =Baff%q{{3Us   /2)rN   )r  r   s   `r   attrs_to_tuple#_make_order.<locals>.attrs_to_tupled  s)      
=B
 
 	
r    c                d   > UR                   U R                   L a  T" U 5      T" U5      :  $ [        $ rq  r   r  r   r  r  s     r   r  _make_order.<locals>.__lt__o  0     ??dnn,!$'.*???r    c                d   > UR                   U R                   L a  T" U 5      T" U5      :*  $ [        $ rq  r  r  s     r   r  _make_order.<locals>.__le__x  0     ??dnn,!$'>%+@@@r    c                d   > UR                   U R                   L a  T" U 5      T" U5      :  $ [        $ rq  r  r  s     r   r  _make_order.<locals>.__gt__  r  r    c                d   > UR                   U R                   L a  T" U 5      T" U5      :  $ [        $ rq  r  r  s     r   r  _make_order.<locals>.__ge__  r!  r    )rC   )r   r   r   r  r  r  r  r  s    `     @r   r  r  ^  sI     )1Q)E	
 6))c *s
   A
A
c                b    Uc  U R                   n[        X5      U l        [        5       U l        U $ )z-
Add equality methods to *cls* with *attrs*.
)r   r  r  r  r  r  s     r   _add_eqr'    s.     }###%CJCJJr    c                   [        US5      n[        S U  5       5      nU VVVs0 s H  u  pVov[        :w  d  M  US-   U_M     nnnn[        US'   [        US'   [
        US'   / n	U HM  u  pVn
U
(       a  SU-   OSU-   S	-   nU[        :X  a
  U< S
U< S3OU< S
U< SU< S3nU	R                  U5        MO     SR                  U	5      nUc  SnOUS-   nSSSSSSSSSSSSSU SU S3SS /n[        S!S"R                  U5      X8S#9$ s  snnnf )$Nr:   c              3     #    U  HN  nUR                   S Ld  M  UR                  UR                   SL a  [         OUR                   UR                  4v   MP     g7f)FTN)r:   rh   r=   r   s     r   r   _make_repr.<locals>.<genexpr>  sD      "A66 	?!&&D.$affqvv>s
   A?A_reprr   r4  r   r  zgetattr(self, "z", NOTHING)z={z!r}z_repr(z)}r   z1{self.__class__.__qualname__.rsplit(">.", 1)[-1]}z.{self.__class__.__name__}zdef __repr__(self):z  try:z:    already_repring = _compat.repr_context.already_repringz  except AttributeError:z!    already_repring = {id(self),}z:    _compat.repr_context.already_repring = already_repringz  else:z#    if id(self) in already_repring:z      return '...'z	    else:z#      already_repring.add(id(self))z    return f'(z)'z
  finally:z$    already_repring.remove(id(self))r   ru   )rZ   )	r   rN   r:   r   r4  r   rw   ry   rn   )r   rb  r   r   attr_names_with_reprsrh   rr  rZ   attribute_fragmentsr~   accessorfragmentrepr_fragmentcls_name_fragmentr   s                   r   ra  ra    sr   /V<O " ""  -B,Ajdq$Yw,A 
  E),E
E)+
GdN%6%=%M 	
 Dy  *'+T8< 	
 	""8, , II12M	zO!== 	D"+D--
)*!M?"=.E$ DIIe$o Us
   D
Dc                F    Uc  U R                   n[        X!U 5      U l        U $ )z
Add a repr method to *cls*.
)r   ra  r   )r   rb  r   s      r   	_add_reprr5    s'     }##e-CLJr    c                    [        U 5      nUc"  [        U [        5      (       d  Sn[        U5      e[	        U SS5      nUc,  Ub  [	        USS5      nUb  X0l        U$ U < S3n[        U5      eU$ )a  
Return the tuple of *attrs* attributes for a class.

The tuple also allows accessing the fields by their names (see below for
examples).

Args:
    cls (type): Class to introspect.

Raises:
    TypeError: If *cls* is not a class.

    attrs.exceptions.NotAnAttrsClassError:
        If *cls* is not an *attrs* class.

Returns:
    tuple (with name accessors) of `attrs.Attribute`

.. versionchanged:: 16.2.0 Returned tuple allows accessing the fields
   by name.
.. versionchanged:: 23.1.0 Add support for generic classes.
NPassed object must be a class.r   ! is not an attrs-decorated class.)r   rL   r5   rH   r   r   r   )r   generic_baserS   r   s       r   r   r     s    . $C(LJsD$9$9.nC*D1E}#L*;TBE  ',#89"3''Lr    c                    [        U [        5      (       d  Sn[        U5      e[        U SS5      nUc  U < S3n[	        U5      eU Vs0 s H  o3R
                  U_M     sn$ s  snf )a  
Return an ordered dictionary of *attrs* attributes for a class, whose keys
are the attribute names.

Args:
    cls (type): Class to introspect.

Raises:
    TypeError: If *cls* is not a class.

    attrs.exceptions.NotAnAttrsClassError:
        If *cls* is not an *attrs* class.

Returns:
    dict[str, attrs.Attribute]: Dict of attribute name to definition

.. versionadded:: 18.1.0
r7  r   Nr8  )rL   r5   rH   r   r   rh   )r   rS   r   r   s       r   fields_dictr;    sj    & c4  .nC*D1E}89"3''$%u!FFAIu%%%s   A!c           	         [         R                  SL a  g[        U R                  5       H0  nUR                  nUc  M  U" X[        XR                  5      5        M2     g)z
Validate all attributes on *inst* that have a validator.

Leaves all exceptions through.

Args:
    inst: Instance of a class with *attrs* attributes.
FN)r   _run_validatorsr   r   r9   r   rh   )r   r   rO  s      r   r  r  2  sI     %'DNN#KK=dwtVV,- $r    c                T    UR                  U 5      nU=(       a    SUR                  ;   $ )z6
Check if the attribute name comes from a slot class.
r;  )r   r   )a_namer   r   s      r   _is_slot_attrr@  D  s(     

F
#C.;#,,..r    c                r   U
S L=(       a    U
[         R                  LnU(       a  U(       a  Sn[        U5      eU=(       d    Un/ n0 nU H  nUR                  (       d  UR                  [
        L a  M)  UR                  U5        UUUR                  '   UR                  b  USL a  Sn[        U5      eSnMl  U(       d  Mu  UR                  [         R                  Ld  M  SnM     [        U S5      n[        UUUUUUUUU	UUU(       a  SOS5      u  nnnU R                  [        R                  ;   a6  UR                  [        R                  U R                     R                  5        UR                  [
        US.5        U(       a  [         R"                  US'   [%        U(       a  SOSUUU5      nUUl        U$ )Nz$Frozen classes can't use on_setattr.Tr=   r  r#  )r   	attr_dictr   )r   r  rI   r=   r8   r   rw   rh   rE   r   _attrs_to_init_scriptr%   sysmodulesr>  r   r   r   rn   __annotations__)r   r   pre_initpre_init_has_args	post_initr  r  r  r   r  cls_on_setattrr  has_cls_on_setattrrS   needs_cached_setattrfiltered_attrsrB  r   r   rY   rZ   r   r=   s                          r   r  r  L  s    	d"J~W]]'J  $4o%/NIvv!))w.a 	!&&<<#~< o%#' ALL$E#'    0V<O!6&J"FE; ~~$S[[099:	LLW9=> (4';';#$&J	D 'DKr    c                    SU  SU S3$ )zB
Use the cached object.setattr to set *attr_name* to *value_var*.

_setattr('r  r  r   )r   	value_varhas_on_setattrs      r   _setattrrR    s     	{#i[22r    	Converterc                2    SU  SUR                  X5       S3$ )z_
Use the cached object.setattr to set *attr_name* to *value_var*, but run
its converter first.
rO  r  r  )_fmt_converter_callr   rP  rQ  r>   s       r   _setattr_with_converterrW    s&     	{#i&C&CI&Y%ZZ[\\r    c                8    U(       a  [        XS5      $ SU  SU 3$ )zc
Unless *attr_name* has an on_setattr hook, use normal assignment. Otherwise
relegate to _setattr.
Tr  r  )rR  )r   r   rQ  s      r   _assignrY    s'    
 	$//9+S((r    c                X    U(       a  [        XSU5      $ SU  SUR                  X5       3$ )z
Unless *attr_name* has an on_setattr hook, use normal assignment after
conversion. Otherwise relegate to _setattr_with_converter.
Tr  r  )rW  rU  rV  s       r   _assign_with_converterr[    s5     &yT9MM9+S!>!>y!T UVVr    c                   ^ U SL a9  USL a  S[         [        4$         SU4S jjn          SU4S jjnSUU4$ S[        [        4$ )z[
Determine the correct setter functions based on whether a class is frozen
and/or slotted.
Tr   c                N   > [        U T5      (       a  [        XU5      $ SU  SU 3$ N_inst_dict['z'] = )r@  rR  )r   rP  rQ  r   s      r   
fmt_setter&_determine_setters.<locals>.fmt_setter  s2     Y66	nEE!)E)==r    c                z   > U(       d  [        U T5      (       a  [        XX#5      $ SU  SUR                  X5       3$ r^  )r@  rW  rU  )r   rP  rQ  r>   r   s       r   fmt_setter_with_converter5_determine_setters.<locals>.fmt_setter_with_converter  sH     y-!H!H..  ")E)2O2OPY2e1fggr    )z_inst_dict = self.__dict__r   r   rP  r   rQ  r  returnr   
r   r   rP  r   rQ  r  r>   rS  rf  r   )rR  rW  rY  r[  )r  r  r   r`  rc  s     `  r   _determine_settersrh    s     ~D=x!888	>	>'*	><@	>	>	h	h	h !	h !		h
 	h ,%
 	
 w...r    c           
        U(       a  S/O/ nU	(       a  UR                  S5        [        XU5      u  pnUR                  U5        / n/ n/ n0 nSS0nU  GH!  nUR                  (       a  UR                  U5        UR                  nUR
                  SL=(       d%    UR
                  [        R                  L=(       a    U
nUR                  n[        UR                  [        5      nU(       a  UR                  R                  (       a  SOSnUR                  b5  [        UR                  [        5      (       d  [        UR                  5      nOUR                  nUR                  SL Ga  U(       a  [         UR                  4-  nUbJ  UR                  U" UUSU S	3-   UU5      5        UR                  UUR#                  UR                  5      '   O UR                  U" UUSU S	3-   U5      5        UR                  R$                  UU'   GOUbH  UR                  U" US
U S3UU5      5        UR                  UUR#                  UR                  5      '   GOUR                  U" US
U S3U5      5        GOUR                  [&        La  U(       d  U SU S3nUR(                  (       a  UR                  U5        OUR                  U5        UbD  UR                  U" UUUU5      5        UR                  UUR#                  UR                  5      '   GOUR                  U" UUU5      5        GOU(       GaN  U S3nUR(                  (       a  UR                  U5        OUR                  U5        UR                  SU S35        [         UR                  4-  nUb}  UR                  SU" UUUU5      -   5        UR                  S5        UR                  SU" UUS-   U-   S	-   UU5      -   5        UR                  UUR#                  UR                  5      '   ORUR                  SU" UUU5      -   5        UR                  S5        UR                  SU" UUS-   U-   S	-   U5      -   5        UR                  R$                  UU'   OUR(                  (       a  UR                  U5        OUR                  U5        UbC  UR                  U" UUUU5      5        UR                  UUR#                  UR                  5      '   OUR                  U" UUU5      5        UR                  SL d  GM  UR*                  b  Uc  UR*                  UU'   GM  Uc  GM  UR,                  (       d  GM  UR,                  UU'   GM$     U(       az  [.        US'   UR                  S5        U HZ  nSUR                  -   nSUR                  -   nUR                  SU SU SUR                   S	35        UR                  UU'   UUU'   M\     U(       a  UR                  S5        U(       a?  U(       a  U(       a  S[0         S3nOS[0         S3nO
S[0         S3nUR                  U5        U(       a-  S R3                  S! U  5       5      n UR                  S"U  S	35        S#R3                  U5      nUn!U(       ac  UU(       a  S#OS S$S#R3                  U5       3-  nS#R3                  S% U 5        V"s/ s H
  n"U" S&U" 3PM     sn"5      n#U!U!(       a  S#OS-  n!U!U#-  n!U(       a  U(       a	  S'U! S	3US('   S)n$S*U SU S+U(       a  U$R3                  U5      OS, S-3UU4$ s  sn"f ).z
Return a script of an initializer for *attrs*, a dict of globals, and
annotations for the initializer.

The globals are required by the generated script.
zself.__attrs_pre_init__()z$_setattr = _cached_setattr_get(self)rf  Nr    Fr,  r  zattr_dict['z
'].defaultz=attr_dict['z=NOTHINGzif z is not NOTHING:rq   zelse:Tr   z#if _config._run_validators is True:__attr_validator___attr_z(self, z, self.zself.__attrs_post_init__()rO  z', None)r_  z	'] = Noner  z = Noner  c              3  d   #    U  H&  oR                   (       d  M  S UR                   3v   M(     g7f)r  N)r=   rh   r   s     r   r   (_attrs_to_init_script.<locals>.<genexpr>  s"     B%Q66(%x(%s   00zBaseException.__init__(self, r   z*, c              3  H   #    U  H  oR                  S 5      S   v   M     g7f)=r   N)split)r   kwas     r   r   rn    s     #N#IIcN1$5r  rp  zself.__attrs_pre_init__(r   z
    zdef z):
    passru   )rw   rh  r   r9   rh   rE   r   r  rF   rL   r8   rK   
takes_selfr>   rS  r=   _INIT_FACTORY_PAT_get_global_namerR   r   r@   r5   _first_param_typer   rE  ry   )%r   r  
is_slottedcall_pre_initrH  call_post_initdoes_cache_hashr   r  rL  rK  method_namer   extra_linesr`  rc  r   kw_only_argsattrs_to_validatenames_for_globalsr   r   r   rQ  arg_namehas_factory
maybe_selfr>   init_factory_nameargval_nameinit_hash_cachevalspre_init_argskw_arg_namepre_init_kw_only_argsNLs%                                        r   rC  rC    s*   ( .;()E 3		
 :L}:6K6 
LLDL T"K;;$$Q'FF	T1 
LL-D2D 	
 77 G4*qyy/C/CV
;;":akk9+M+M!!++.II66U?$5	$A!(LL1%-!J<q0AA*%	 "++ &i&@&@&HI LL"%-!J<q0AA* 89yy7H7H!"34&-!%i[
;&!	 '' ")"<"<QVV"DE !%i[
;& YYg%kJl9+Z@Cyy##C(C $-!8^Y '' ")"<"<QVV"DE Z	8^LMJh'Cyy##C(C LL3xj(89: 1QVVI =$/!8^Y W%/!)C/*<sB&!	 '' ")"<"<QVV"DE Z	8^LL W% !)C/*<sB& 45993D3D/0yy##H-H%$-!8^Y '' ")"<"<QVV"DE Z	8^LM66T>vv!i&7()H%&9+F+F+F(1(C(CH%k n '.)$:;"A*QVV3H!AFF*ILL4z7166(!LM*+++h'+,i( # 12 $./@.A"J$01B0C9"M %&7%8@O_% xxB%BB4TF!<=99T?DM44R(DIIl,C+DEE $		 $O#N $OK -q.#N!
 	B6..*-m_A>a 
BWTF +RWWU^&) *	 	 s   ]	c                $    U R                  S5      $ )z
The default __init__ parameter name for a field.

This performs private-name adjustment via leading-unscore stripping,
and is the default value of Attribute.alias if not provided.
r  )lstripr  s    r   r   r     s     ;;sr    c                  l    \ rS rSrSrSr          SS jrS r\SS j5       r	S r
S	 rS
 rS rSrg)r   i	  a6  
*Read-only* representation of an attribute.

.. warning::

   You should never instantiate this class yourself.

The class has *all* arguments of `attr.ib` (except for ``factory`` which is
only syntactic sugar for ``default=Factory(...)`` plus the following:

- ``name`` (`str`): The name of the attribute.
- ``alias`` (`str`): The __init__ parameter name of the attribute, after
  any explicit overrides and default private-attribute-name handling.
- ``inherited`` (`bool`): Whether or not that attribute has been inherited
  from a base class.
- ``eq_key`` and ``order_key`` (`typing.Callable` or `None`): The
  callables that are used for comparing and ordering objects by this
  attribute, respectively. These are set by passing a callable to
  `attr.ib`'s ``eq``, ``order``, or ``cmp`` arguments. See also
  :ref:`comparison customization <custom-comparison>`.

Instances of this class are frequently used for introspection purposes
like:

- `fields` returns a tuple of them.
- Validators get them passed as the first argument.
- The :ref:`field transformer <transform-fields>` hook receives a list of
  them.
- The ``alias`` property exposes the __init__ parameter name of the field,
  with any overrides and default private-attribute handling applied.


.. versionadded:: 20.1.0 *inherited*
.. versionadded:: 20.1.0 *on_setattr*
.. versionchanged:: 20.2.0 *inherited* is not taken into account for
    equality checks and hashing anymore.
.. versionadded:: 21.1.0 *eq_key* and *order_key*
.. versionadded:: 22.2.0 *alias*

For the full version history of the fields, see `attr.ib`.
)rh   r8   r9   r:   rA   rB   rC   rD   r<   r=   r?   r5   r>   r@   r   rE   rF   Nc                   [        X^=(       d    UU=(       d    US5      u  pnn[        R                  U 5      nU" SU5        U" SU5        U" SU5        U" SU5        U" SU5        U" SU5        U" SU5        U" S	U5        U" S
U5        U" SU5        U" SU5        U" SU	(       a  [        R                  " [        U	5      5      O[        5        U" SU
5        U" SU5        U" SU5        U" SU5        U" SU5        g )NTrh   r8   r9   r:   rA   rB   rC   rD   r<   r=   r>   r?   r5   r@   r   rE   rF   )rG   r   r   typesMappingProxyTyper  _EMPTY_METADATA_SINGLETON)r   rh   r8   r9   r:   r;   r<   r=   r   r?   r5   r>   r@   rA   rB   rC   rD   rE   rF   bound_setattrs                       r   r#  Attribute.__init__C	  s   * (B2y1E4(
$E9
 %,,T2 	fd#i)k9-fd#dBh'gu%k9-fd#fd#k9-  &&tH~6.	
 	fd#i)k9-lJ/gu%r    c                    [         er0   )r   r   s      r   r   Attribute.__setattr__z	  s    !!r    c           
     
   Uc  UR                   nOUR                   b  Sn[        U5      e[        R                   Vs0 s H  nUS;  d  M  U[	        X%5      _M     nnU " SUUR
                  UR                  US SS.UD6$ s  snf )Nz8Type annotation and type argument cannot both be present)rh   r9   r8   r5   r   F)rh   r9   r8   r5   r;   r   r   )r5   rI   r   r;  r   
_validator_default)r   rh   r   r5   rS   rN  	inst_dicts          r   r   Attribute.from_counting_attr}	  s     <77DWW LCS/! ((
( Awr~( 	 
  
mmKK
 
 	

s   
B B c                p    [         R                   " U 5      nUR                  UR                  5       5        U$ )z
Copy *self* and apply *changes*.

This works similarly to `attrs.evolve` but that function does not work
with :class:`attrs.Attribute`.

It is mainly meant to be used for `transform-fields`.

.. versionadded:: 20.3.0
)copy	_setattrsr   )r   r   news      r   r   Attribute.evolve	  s(     iiogmmo&
r    c                B   ^  [        U 4S jT R                   5       5      $ )
Play nice with pickle.
c              3  r   >#    U  H,  nUS :w  a  [        TU5      O[        TR                  5      v   M.     g7f)r?   N)r   r  r?   r   rh   r   s     r   r   )Attribute.__getstate__.<locals>.<genexpr>	  s4      
& $(:#5GD$4;NN&s   47rN   r;  r   s   `r   r  Attribute.__getstate__	  s#      

 
 	
r    c                N    U R                  [        U R                  U5      5        gr  N)r  rx  r;  r   ry  s     r   r  Attribute.__setstate__	  s     	s4>>512r    c           	         [         R                  U 5      nU HH  u  p4US:w  a
  U" X45        M  U" UU(       a  [        R                  " [	        U5      5      O[
        5        MJ     g )Nr?   )r   r   r  r  r  r  )r   name_values_pairsr  rh   r   s        r   r  Attribute._setattrs	  sU    $,,T2,KDz!d* ! ..tE{;6	 -r    r   )
NNNFNNNNNNr0   )r$   r%   r&   r'   r(   r;  r#  r   rI  r   r   r  r  r  r+   r   r    r   r   r   	  sb    (XI< '5&n" 
 
<$
3r    r   r?   )rh   r8   r9   r:   r;   rA   rC   r<   r=   r   rF   )r   r   c                  ~    \ rS rSrSrSr/ \" S S 5       5      Q\" SSSSSSS	SS	SSS	SS	SS
9P7rSr	S r
S rS rSrg)rQ   i	  a  
Intermediate representation of attributes that uses a counter to preserve
the order in which the attributes have been defined.

*Internal* data structure of the attrs library.  Running into is most
likely the result of a bug like a forgotten `@attr.s` decorator.
)r  r  rF   r>   r   rA   rB   r<   r=   r@   r?   rE   rC   rD   r:   r5   c              #  j   #    U  H)  n[        U[        U5      [        S SS SSSSS SS SS S9v   M+     g 7f)NTFrh   rF   r8   r9   r:   r;   r<   r=   r@   rA   rB   rC   rD   r   rE   )r   r   r   )r   rh   s     r   r   _CountingAttr.<genexpr>
  sR      
$
# -d3"
s   13)	r   r  r:   rA   rC   r<   r=   rE   rF   r?   NTFr  r   c                   [         =R                  S-  sl        [         R                  U l        Xl        X l        Xpl        X0l        Xl        Xl        Xl	        Xl
        XPl        X`l        Xl        Xl        Xl        Xl        UU l        g r   )rQ   cls_counterr   r  r  r>   r:   rA   rB   rC   rD   r<   r=   r?   r5   r@   rE   rF   )r   r8   r9   r:   r;   r<   r=   r>   r?   r5   r@   rA   rB   rC   rD   rE   rF   s                    r   r#  _CountingAttr.__init__5
  so    & 	!!Q&!$00#"	
"		 	$
r    c                f    U R                   c  Xl         U$ [        U R                   U5      U l         U$ )zl
Decorator that adds *meth* to the list of validators.

Returns *meth* unchanged.

.. versionadded:: 17.1.0
)r  rP   r   r  s     r   r9   _CountingAttr.validatorZ
  s3     ??""O  #4??D9DOr    c                V    U R                   [        La  [        e[        USS9U l         U$ )z
Decorator that allows to set the default for an attribute.

Returns *meth* unchanged.

Raises:
    DefaultAlreadySetError: If default has been set before.

.. versionadded:: 17.1.0
T)rt  )r  r   r   rK   r  s     r   r8   _CountingAttr.defaulth
  s)     =='((6r    )r$   r%   r&   r'   r(   r;  rN   r   r   r  r#  r9   r8   r+   r   r    r   rQ   rQ   	  s    I$0	 
$
%
 

0> 		
?0Ob K#Jr    rQ   c                  2    \ rS rSrSrSrSS jrS rS rSr	g)	rK   i~
  a  
Stores a factory callable.

If passed as the default value to `attrs.field`, the factory is used to
generate a new value.

Args:
    factory (typing.Callable):
        A callable that takes either none or exactly one mandatory
        positional argument depending on *takes_self*.

    takes_self (bool):
        Pass the partially initialized instance that is being initialized
        as a positional argument.

.. versionadded:: 17.1.0  *takes_self*
rR   rt  c                    Xl         X l        g r0   r  )r   rR   rt  s      r   r#  Factory.__init__
  s    $r    c                B   ^  [        U 4S jT R                   5       5      $ )r  c              3  <   >#    U  H  n[        TU5      v   M     g 7fr0   rs  r  s     r   r   'Factory.__getstate__.<locals>.<genexpr>
  s     D^TWT4((^s   r  r   s   `r   r  Factory.__getstate__
  s     DT^^DDDr    c                Z    [        U R                  U5       H  u  p#[        XU5        M     gr  )rx  r;  r6  )r   ry  rh   r   s       r   r  Factory.__setstate__
  s%     t~~u5KDD& 6r    N)F)
r$   r%   r&   r'   r(   r;  r#  r  r  r+   r   r    r   rK   rK   ~
  s    $ *I%E'r    rK   )
rh   r8   r9   r:   r;   rA   rC   r<   r=   r   c                  V    \ rS rSrSrSrSSS.S jr\SS j5       rSS jr	S	 r
S
 rSrg)rS  i
  a1  
Stores a converter callable.

Allows for the wrapped converter to take additional arguments. The
arguments are passed in the order they are documented.

Args:
    converter (Callable): A callable that converts the passed value.

    takes_self (bool):
        Pass the partially initialized instance that is being initialized
        as a positional argument. (default: `False`)

    takes_field (bool):
        Pass the field definition (an :class:`Attribute`) into the
        converter as a positional argument. (default: `False`)

.. versionadded:: 24.1.0
)__call__rw  _global_namer>   takes_fieldrt  Frt  r  c                 ^  UT l         UT l        UT l        [        U5      nUR	                  5       T l        T R                  (       d  T R                  (       d  U 4S jT l        OgT R                  (       a  T R                  (       d  U 4S jT l        O9T R                  (       d  T R                  (       a  U 4S jT l        OU 4S jT l        UR                  5       nUb  UT R                  R                  S'   g g )Nc                &   > TR                  U 5      $ r0   r>   )r   r  __r   s      r   r   $Converter.__init__.<locals>.<lambda>
  s    1Fr    c                &   > TR                  X5      $ r0   r  )r   instancer  r   s      r   r   r  
  s    9r    c                &   > TR                  X5      $ r0   r  )r   r  r  r   s      r   r   r  
  s    T^^6r    c                (   > TR                  XU5      $ r0   r  )r   r  r  r   s      r   r   r  
  s    4>><r    rf  )	r>   rt  r  r   get_first_param_typerw  r  get_return_typerF  )r   r>   rt  r  exrts   `     r   r#  Converter.__init__
  s    "$&!),!#!8!8!:4#3#3FDM__T%5%5DM T%5%5DMDM !>68DMM))(3 r    c                    SU  3$ )zP
Return the name that a converter for an attribute name *attr_name*
would have.
__attr_converter_r   )r   s    r   rv  Converter._get_global_name
  s     #9+..r    c                p   U R                   (       d(  U R                  (       d  U R                  U5       SU S3$ U R                   (       a+  U R                  (       a  U R                  U5       SU SU S3$ U R                   (       a  U R                  U5       SU S3$ U R                  U5       SU SU S3$ )z
Return a string that calls the converter for an attribute name
*attr_name* and the value in variable named *value_var* according to
`self.takes_self` and `self.takes_field`.
r,  r  z, self, attr_dict['z'])z, self)z, attr_dict[')rt  r  rv  )r   r   rP  s      r   rU  Converter._fmt_converter_call
  s     4#3#3++I67q1EE??t//++I67qCVW`Vaadee??++I67q7KK''	231YK}YKWZ[[r    c                J    U R                   U R                  U R                  S.$ )z`
Return a dict containing only converter and takes_self -- the rest gets
computed when loading.
r>   rt  r  r  r   s    r   r  Converter.__getstate__
  s%     //++
 	
r    c                (    U R                   " S0 UD6  g)z
Load instance from state.
Nr   r  r  s     r   r  Converter.__setstate__  s     	r    )r  rw  r>   r  rt  N)r   r   rf  r   )r   r   rP  r   rf  r   )r$   r%   r&   r'   r(   r;  r#  rJ  rv  rU  r  r  r+   r   r    r   rS  rS  
  s>    (I 165 96 / /\"	
r    r  c                  ^ [        U[        5      (       a  UnOC[        U[        [        45      (       a  U Vs0 s H  of[	        5       _M     nnOSn[        U5      eUR                  SS5      nUR                  SS5      n	UR                  SS5      n
0 mUb  TR                  U5        Ub  UTS'   U	b  U	TS'   U
b  U
TS'   [        R                  " X0 U4S j5      n[        R                  " [        [        5         [        R                  " S5      R                   R#                  SS	5      Ul        SSS5        UR                  S
S5      n['        UUR#                  S5      UR#                  S5      S5      u  US'   US'   [)        SSU0UD6" U5      nUR+                  5        VVs0 s H   u  pUR,                  c  M  XR,                  _M"     snnUl        U$ s  snf ! , (       d  f       N= fs  snnf )a  
A quick way to create a new class called *name* with *attrs*.

.. note::

    ``make_class()`` is a thin wrapper around `attr.s`, not `attrs.define`
    which means that it doesn't come with some of the improved defaults.

    For example, if you want the same ``on_setattr`` behavior as in
    `attrs.define`, you have to pass the hooks yourself: ``make_class(...,
    on_setattr=setters.pipe(setters.convert, setters.validate)``

Args:
    name (str): The name for the new class.

    attrs (list | dict):
        A list of names or a dictionary of mappings of names to `attr.ib`\
        s / `attrs.field`\ s.

        The order is deduced from the order of the names or attributes
        inside *attrs*.  Otherwise the order of the definition of the
        attributes is used.

    bases (tuple[type, ...]): Classes that the new class will subclass.

    class_body (dict):
        An optional dictionary of class attributes for the new class.

    attributes_arguments: Passed unmodified to `attr.s`.

Returns:
    type: A new class with *attrs*.

.. versionadded:: 17.1.0 *bases*
.. versionchanged:: 18.1.0 If *attrs* is ordered, the order is retained.
.. versionchanged:: 23.2.0 *class_body*
z(attrs argument must be a dict or a list.r
  Nr  r#  c                &   > U R                  T5      $ r0   )r>  )rb  bodys    r   r   make_class.<locals>.<lambda>o  s    		$r    r   r$   __main__r;   rA   rC   Tr   r   )rL   r  rM   rN   rT   rH   popr>  r  	new_classr2  r3  r4  rI   rD  	_getframe	f_globalsr   r%   r  r   r   r5   rF  )rh   r   bases
class_bodyattributes_argumentscls_dictr   rS   rG  rI  	user_inittype_r;   r   rN  rO  r  s                   @r   
make_classr  1  s   P %	ED%=	)	))./AvxK/8n||0$7H2D9IZ.IDJ%-!"&/"#$ZOOD-GHE 
		^Z	8==+5599

 
9 
"
"5$
/C 	"  &  )		T"W% 
8x
8#7
8
?C 'nn..da!&&	66	.C J_ 02 
9	8&s   G<6G'G/>G/
G,)r  r  c                  ,    \ rS rSrSr\" 5       rS rSrg)_AndValidatori  z*
Compose many validators to a single one.
c                <    U R                    H  nU" XU5        M     g r0   )_validators)r   r   r   r   rO  s        r   r  _AndValidator.__call__  s    !!Ad%  "r    r   N)	r$   r%   r&   r'   r(   rT   r  r  r+   r   r    r   r  r    s     (K!r    r  c                     / nU  H6  nUR                  [        U[        5      (       a  UR                  OU/5        M8     [        [	        U5      5      $ )z
A validator that composes multiple validators into one.

When called on a value, it runs all wrapped validators.

Args:
    validators (~collections.abc.Iterable[typing.Callable]):
        Arbitrary number of validators.

.. versionadded:: 17.1.0
)r   rL   r  r  rN   )
validatorsr  r9   s      r   rP   rP     sM     D	)]33 !!	
   t%%r    c                   ^  [        S T  5       5      nU(       a  U 4S jnOU 4S jnT (       d4  [        R                  " S5      nUR                  R	                  X3S.5        O[        T S   5      R                  5       nU(       a  XBR                  S'   T S   n[        (       d!  [        U[        5      (       a  UR                  n[        U5      R                  5       nU(       a  XbR                  S	'   U(       a  [        US
S
S9$ U$ )aa  
A converter that composes multiple converters into one.

When called on a value, it runs all wrapped converters, returning the
*last* value.

Type annotations will be inferred from the wrapped converters', if they
have any.

    converters (~collections.abc.Iterable[typing.Callable]):
        Arbitrary number of converters.

.. versionadded:: 20.1.0
c              3  B   #    U  H  n[        U[        5      v   M     g 7fr0   rL   rS  )r   cs     r   r   pipe.<locals>.<genexpr>  s     GJq*Q	22Js   c                f   > T H)  n[        U[        5      (       a	  U" XU5      OU" U 5      n M+     U $ r0   r  )r  r   r  r  
converterss       r   pipe_converterpipe.<locals>.pipe_converter  s5    +5a+C+CAc'3   
 Jr    c                *   > T H  nU" U 5      n M     U $ r0   r   )r  r  r   s     r   r  r    s    f   Jr    A)r  rf  r   r  r`   rf  Tr  )r  typingTypeVarrF  r>  r   r  r
   rL   rS  r  r  )r   return_instancer  r  tlastr  s   `      r   rO   rO     s      GJGGO		 NN3&&--a.EF !A/DDF45**51"~|
4 ; ;==D "$'77979**84DdKKr    )Nrj  r0   )T)NNNNNNNFFTFFFFFNNFFNNNTN)NNre  rg  )r   r   r   r   rQ  r  rf  r   )r  r  r  r  r   dict[str, type])r   zlist[Attribute]r  r  rx  r  ry  r  rH  r  rz  r  r{  r  r   r
  r  r  rL  r  rK  r  r|  r   rf  ztuple[str, dict, dict])rh   r   rf  r   )e
__future__r   r+  r2  r  r)   r?  r  rF  re   rD  r  r  operatorr   rj  r   r   r   r	   r
   r   r   r   r   
exceptionsr   r   r   r   objectr   r   ru  r   rE  r  r  r1  rO   r  r  r  Enumr   r   intr-   rT   r^   rn   r   r   r   r   r   r   r   r   r   r   r   r   r  rG   r  r   r   r  r   r  r	  r  r  r  r'  ra  r5  r   r;  r@  r  rR  rW  rY  r[  rh  rC  r   r   r;  _arh   r<   rQ   rK   _frS  r  r  rP   )rh   r   s   00r   <module>r     so   # 
        
    ( '   !!'   ) !2226  H	ll7??G4D4DE tyy ( 

( (" 				

hV :": %
0"'#>%8jGZ7t"7tF FR8((X .26 
			

1]@ 
/DDN&#BL5*p
6r+\&:.$/L^3]]"]48]EN]])
W
W"
W48
WEN
W
W,/,/,/.=,/^AAA A 	A
 A A A #A A A A A AHH Hr ## $ j %d+ $" )2&6"Q+ 5q"6 
=bFF1qvv'<1b
=	Q Qh 	-01$' $'h !! "  "  GIgR8C2
Na ab ; ;  ;  Iir*"5R	 yTZB Tt$	! 	! %	!&.9S( 7
=Dns0   ;#M/M	M	M
,M
>M
9M4M