Ë
    pPêjã³  ã                  ó”  — U d Z ddlmZ ddlmZ ddlmZmZ ddlm	Z	 ddl
mZmZmZ ddlZddlmZ dd	lmZ dd
lmZmZ ddlmZmZ ddlmZ ddlmZ ddlmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z; ddlm<Z< ddl=m>Z>m?Z?m@Z@mAZAmBZBmCZC ddlDmEZE ddlFmGZG ddlHmIZImJZJmKZKmLZL ddlMmNZNmOZOmPZPmQZQmRZRmSZSmTZTmUZUmVZVmWZWmXZXmYZYmZZZm[Z[m\Z\m]Z]m^Z^m_Z_ ddl`maZa ddlbmcZc h d£Zddeed<   dhZfdeed<   ddhZgdeed<   h d£Zhdeed <   h d!£Zideed"<   d#d$hZjdeed%<   d&Zkdeed'<   d(Zldeed)<   d*Zmdeed+<   d,Zndeed-<    G d.„ d/«      Zo G d0„ d1«      ZpdQd2„Zq	 dR	 	 	 	 	 	 	 dSd3„ZrdTd4„Zs	 	 	 dU	 	 	 	 	 	 	 	 	 dVd5„Zt	 	 	 	 	 	 	 	 	 	 dVd6„ZudWd7„Zv	 	 	 	 	 	 	 	 dXd8„ZwdYd9„ZxdQd:„Zy	 	 	 	 	 	 	 	 	 	 dZd;„Zzd[d<„Z{	 	 	 	 	 	 	 	 	 	 	 	 d\d=„Z|	 	 	 	 	 	 	 	 	 	 	 	 	 	 d]d>„Z}	 	 	 	 	 	 d^d?„Z~d_d@„Z	 	 	 	 	 	 d`dA„Z€dadC„Z�dbdD„Z‚	 	 	 	 	 	 	 	 	 	 dcdE„Zƒ	 	 	 	 	 	 dddF„Z„dbdG„Z…dbdH„Z†dTdI„Z‡ G dJ„ dB«      ZˆdedK„Z‰dfdL„ZŠ	 	 	 	 	 	 	 	 	 	 dgdM„Z‹dhdN„ZŒdidO„Z�didP„ZŽy)jz>Plugin for supporting the attrs library (http://www.attrs.org)é    )Úannotations)Údefaultdict)ÚIterableÚMapping)Úreduce)ÚFinalÚLiteralÚcastN)Úapply_generic_arguments)ÚLITERAL_REQ)Úexpand_typeÚexpand_type_by_instance)ÚTypeTranslationErrorÚexpr_to_unanalyzed_type)Ú
meet_types)Úformat_type_bare)Ú	ARG_NAMEDÚARG_NAMED_OPTÚARG_OPTÚARG_POSÚMDEFÚArgumentÚAssignmentStmtÚCallExprÚContextÚ	DecoratorÚ
ExpressionÚFuncDefÚ	IndexExprÚJsonDictÚ
LambdaExprÚListExprÚ
MemberExprÚNameExprÚOverloadedFuncDefÚPlaceholderNodeÚRefExprÚSymbolTableNodeÚTempNodeÚ	TupleExprÚTypeApplicationÚTypeInfoÚTypeVarExprÚVarÚis_class_var)ÚSemanticAnalyzerPluginInterface)Ú_get_argumentÚ_get_bool_argumentÚ_get_decorator_bool_argumentÚadd_attribute_to_classÚadd_method_to_classÚdeserialize_and_fixup_type)Úmake_wildcard_trigger)Ústate)Úget_type_varsÚmake_simplified_unionÚmap_type_from_supertypeÚtype_object_type)ÚAnyTypeÚCallableTypeÚFunctionLikeÚInstanceÚLiteralTypeÚNoneTypeÚ
OverloadedÚ
ProperTypeÚ	TupleTypeÚTypeÚ	TypeOfAnyÚTypeTypeÚ	TypeVarIdÚTypeVarTypeÚUninhabitedTypeÚ	UnionTypeÚget_proper_typeÚis_unannotated_any)Úfill_typevars)Úunmangle>   úattr.sú
attr.attrsúattr.attributesr   Úattr_class_makerszattr.dataclassÚattr_dataclass_makerszattr.frozenzattrs.frozenÚattr_frozen_makers>   úattr.defineúattr.mutableúattrs.defineúattrs.mutableÚattr_define_makers>   úattr.ibú	attr.attrú
attr.fieldúattr.attribúattrs.fieldÚattr_attrib_makerszattr.converters.optionalzattrs.converters.optionalÚattr_optional_convertersÚ_ATÚSELF_TVAR_NAMEÚ__attrs_attrs__ÚMAGIC_ATTR_NAMEz__{}_AttrsAttributes__ÚMAGIC_ATTR_CLS_NAME_TEMPLATEÚ__attrs_init__ÚATTRS_INIT_NAMEc                  ó   — e Zd ZdZddd„Zy)Ú	Converterz/Holds information about a `converter=` argumentNc                ó    — || _         || _        y ©N)Ú	init_typeÚret_type)Úselfrn   ro   s      úW/home/oem/CyberBrain26-unified/.venv/lib/python3.12/site-packages/mypy/plugins/attrs.pyÚ__init__zConverter.__init__i   s   € Ø"ˆŒØ ˆ�ó    ©NN)rn   úType | Nonero   ru   ÚreturnÚNone)Ú__name__Ú
__module__Ú__qualname__Ú__doc__rr   © rs   rq   rk   rk   f   s
   „ Ù9õ!rs   rk   c                  óz   — e Zd ZdZ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„Zd	d„Zd
d„Ze	 	 	 	 	 	 	 	 dd„«       Zdd„Z	y)Ú	AttributezThe value of an attr.ib() call.c
                ó‚   — || _         || _        || _        || _        || _        || _        || _        || _        |	| _        y rm   )	ÚnameÚaliasÚinfoÚhas_defaultÚinitÚkw_onlyÚ	converterÚcontextrn   )
rp   r€   r�   r‚   rƒ   r„   r…   r†   r‡   rn   s
             rq   rr   zAttribute.__init__q   sD   € ð ˆŒ	ØˆŒ
ØˆŒ	Ø&ˆÔØˆŒ	ØˆŒØ"ˆŒØˆŒØ"ˆ�rs   c                óv  — | j                   sJ ‚d}| j                  �r| j                  j                  r¿| j                  j                  }|�r| j                  �r
| j                  j                  rôt	        | j                  j                  «      }t	        | j                  «      }|r¾t        |«      t        |«      k(  r§t        ||«      D ��ci c]  \  }}|j                  |“Œ }}}t        ||«      }nq|j                  j                  d| j                  «       t        t        j                  «      }n1| j                  xs# | j                  | j                      j"                  }d}|€d}t        t        j$                  «      }n:t'        |«      }	t)        |	t        «      r|	j*                  t        j$                  k(  rd}|rw|j                  j,                  j.                  rW| j                  | j                      j0                  }
|
€J ‚|j                  j2                  j5                  |
| j                  «       | j6                  r| j8                  rt:        nt<        }n| j8                  rt>        nt@        }| jB                  xs | j                   jE                  d«      }tG        tI        ||«      |d|«      S c c}}w )z1Return this attribute as an argument to __init__.Nz-Cannot determine __init__ type from converterFTÚ_)%r„   r†   rn   ro   r9   ÚlenÚzipÚidr   ÚapiÚfailr‡   r=   rG   Ú
from_errorr‚   r€   ÚtypeÚunannotatedrM   Ú
isinstanceÚtype_of_anyÚoptionsÚdisallow_untyped_defsÚnodeÚmsgÚneed_annotation_for_varr…   rƒ   r   r   r   r   r�   Úlstripr   r.   )rp   Úctxrn   Úconverter_varsÚ	init_varsÚbinderÚargÚ	variablesr‘   Úproper_typer–   Úarg_kindr€   s                rq   ÚargumentzAttribute.argument‡   s
  € à�yŠyÐˆyØ!%ˆ	Ø�>‹>Ø�~‰~×'Ò'Ø ŸN™N×4Ñ4�	Ú §£°D·N±N×4KÒ4Kô &3°4·>±>×3JÑ3JÓ%K�NÜ -¨d¯n©nÓ =�IÙ%¬#¨nÓ*=ÄÀYÃÒ*Oä>AÀ.ÐR[Ó>\÷%Ù/:¨v°s˜FŸI™I s™Nð%˜	ñ %ô %0°	¸9Ó$E™	à—‘—‘ÐLÈdÏlÉlÔ[Ü#¤I×$8Ñ$8Ó9‘	àŸ™ÒC¨$¯)©)°D·I±IÑ*>×*CÑ*CˆIàˆØÐØˆKä¤	× 5Ñ 5Ó6‰Iä)¨)Ó4ˆKÜ˜+¤wÔ/Ø×*Ñ*¬i×.CÑ.CÒCØ"&�Ká˜3Ÿ7™7Ÿ?™?×@Ò@ð
 —9‘9˜TŸY™YÑ'×,Ñ,ˆDØÐ#Ð#Ð#Ø�G‰G�K‰K×/Ñ/°°d·l±lÔCà�<Š<Ø(,×(8Ò(8•}¼i‰Hà"&×"2Ò"2•w¼ˆHð �z‰zÒ2˜TŸY™Y×-Ñ-¨cÓ2ˆÜœ˜D )Ó,¨i¸¸xÓHÐHùóK%s   ÃJ5c                óÄ  — | j                   | j                  | j                  | j                  | j                  | j
                  du| j
                  r:| j
                  j                  r$| j
                  j                  j                  «       nd| j                  j                  | j                  j                  | j                  r| j                  j                  «       dœ
S ddœ
S )z6Serialize this object so it can be saved and restored.N)
r€   r�   rƒ   r„   r…   Úhas_converterÚconverter_init_typeÚcontext_lineÚcontext_columnrn   )r€   r�   rƒ   r„   r…   r†   rn   Ú	serializer‡   ÚlineÚcolumn)rp   s    rq   r¨   zAttribute.serialize»   s°   € ð —I‘IØ—Z‘ZØ×+Ñ+Ø—I‘IØ—|‘|Ø!Ÿ^™^°4Ð7ð —>’> d§n¡n×&>Ò&>ð —‘×(Ñ(×2Ñ2Ô4àà ŸL™L×-Ñ-Ø"Ÿl™l×1Ñ1Ø7;·~²~˜Ÿ™×1Ñ1Ó3ñ
ð 	
ð LPñ
ð 	
rs   c                óÜ   — |d   }|rt        ||«      nd}|d   }|rt        ||«      nd}t        |d   |d   ||d   |d   |d   |d	   rt        |«      ndt        |d
   |d   ¬«      |«	      S )z)Return the Attribute that was serialized.rn   Nr¥   r€   r�   rƒ   r„   r…   r¤   r¦   r§   )r©   rª   )r6   r~   rk   r   )Úclsr‚   Údatar�   Úraw_init_typern   Úraw_converter_init_typer¥   s           rq   ÚdeserializezAttribute.deserializeÎ   s¦   € ð
 ˜[Ñ)ˆÙFSÔ.¨}¸cÔBÐY]ˆ	Ø"&Ð'<Ñ"=Ðñ 'ô 'Ð'>ÀÔDàð 	ô Ø�‰LØ�‰MØØ�ÑØ�‰LØ�‰OØ.2°?Ò.CŒIÐ)Ô*ÈÜ˜˜nÑ-°dÐ;KÑ6LÔMØó

ð 
	
rs   c                óx   — | j                   r't        | j                   || j                  «      | _         yd| _         y)zoExpands type vars in the context of a subtype when an attribute is inherited
        from a generic super type.N)rn   r;   r‚   )rp   Úsub_types     rq   Úexpand_typevar_from_subtypez%Attribute.expand_typevar_from_subtypeè   s*   € ð �>Š>Ü4°T·^±^ÀXÈtÏyÉyÓYˆD�Nà!ˆD�Nrs   N)r€   Ústrr�   z
str | Noner‚   r,   rƒ   Úboolr„   rµ   r…   rµ   r†   úConverter | Noner‡   r   rn   ru   rv   rw   )rš   úmypy.plugin.ClassDefContextrv   r   )rv   r    )r‚   r,   r­   r    r�   r0   rv   r~   )r²   r,   rv   rw   )
rx   ry   rz   r{   rr   r¢   r¨   Úclassmethodr°   r³   r|   rs   rq   r~   r~   n   s±   „ Ù)ð#àð#ð ð#ð ð	#ð
 ð#ð ð#ð ð#ð $ð#ð ð#ð ð#ð 
ó#ó,2Ióh
ð& ð
Øð
Ø#+ð
Ø2Qð
à	ò
ó ð
ô2"rs   r~   c                ó4  — t        | d«      }t        | d«      }t        | d«      }|�7t        |du|duf«      r&| j                  j                  d| j                  «       |�|S |€d}|€|}|du r*|du r&| j                  j                  d| j                  «       |S )	zh
    Validate the combination of *cmp*, *eq*, and *order*. Derive the effective
    value of order.
    ÚcmpÚeqÚorderNz%Don't mix "cmp" with "eq" and "order"TFz eq must be True if order is True)Ú%_get_decorator_optional_bool_argumentÚanyr�   rŽ   Úreason)rš   rº   r»   r¼   s       rq   Ú_determine_eq_orderrÀ   ñ   s¤   € ô
 0°°UÓ
;€CÜ	.¨s°DÓ	9€BÜ1°#°wÓ?€Eà
€œ3 ¨$ °¸TÐ0AÐBÔCØ�‰�‰Ð=¸s¿z¹zÔJð €Øˆ
ð 
€zØˆà€}Øˆà	ˆU�{�u ‘}Ø�‰�‰Ð7¸¿¹ÔDà€Lrs   c                óR  — t        | j                  t        «      rŒt        | j                  |«      }|rrt        |t        «      r0|j
                  dk(  ry|j
                  dk(  ry|j
                  dk(  ry| j                  j                  d|› d�| j                  t        ¬	«       |S |S |S )
zqReturn the Optional[bool] argument for the decorator.

    This handles both @decorator(...) and @decorator.
    zbuiltins.TrueTzbuiltins.FalseFzbuiltins.NoneNú"z1" argument must be a True, False, or None literal©Úcode)	r’   r¿   r   r1   r$   Úfullnamer�   rŽ   r   )rš   r€   ÚdefaultÚ
attr_values       rq   r½   r½     s    € ô �#—*‘*œhÔ'Ü" 3§:¡:¨tÓ4ˆ
ÙÜ˜*¤hÔ/Ø×&Ñ&¨/Ò9ØØ×&Ñ&Ð*:Ò:Ø Ø×&Ñ&¨/Ò9ØØ�G‰G�L‰LØ�D�6ÐJÐKØ—
‘
Ü ð ô ð
 ˆNØˆàˆrs   c                óJ   — i | j                   j                  j                  d<   y)zÃRecord that we have an attrs class in the main semantic analysis pass.

    The later pass implemented by attr_class_maker_callback will use this
    to detect attrs classes in base classes.
    Ú	attrs_tagN)r¬   r‚   Úmetadata©rš   s    rq   Úattr_tag_callbackrÌ   *  s   € ð *,€C‡G�G‡L�L×Ñ˜+Ò&rs   c                ó°   — t        j                  | j                  j                  j                  «      5  t        | |||«      cddd«       S # 1 sw Y   yxY w)að  Add necessary dunder methods to classes decorated with attr.s.

    attrs is a package that lets you define classes without writing dull boilerplate code.

    At a quick glance, the decorator searches the class body for assignments of `attr.ib`s (or
    annotated variables if auto_attribs=True), then depending on how the decorator is called,
    it will add an __init__ or all the compare methods.
    For frozen=True it will turn the attrs into properties.

    Hashability will be set according to https://www.attrs.org/en/stable/hashing.html.

    See https://www.attrs.org/en/stable/how-does-it-work.html for information on how attrs works.

    If this returns False, some required metadata was not ready yet, and we need another
    pass.
    N)r8   Ústrict_optional_setr�   r”   Ústrict_optionalÚattr_class_maker_callback_impl)rš   Úauto_attribs_defaultÚfrozen_defaultÚslots_defaults       rq   Úattr_class_maker_callbackrÔ   4  sI   € ô, 
×	"Ñ	" 3§7¡7§?¡?×#BÑ#BÓ	Cñ 
ô .ØÐ% ~°}ó
÷
÷ 
ò 
ús   ´AÁAc           	     óJ  — | j                   j                  }t        | dd«      }t        | |«      }t	        | «      }t        | d|«      }t        | d|«      }	t        | dd«      }
t        | dd«      }| j                   j                  j                  dd	 D ]!  }d
|j                  v sŒd|j                  vsŒ! y t        | |	|
«      }|D ],  }|j                  |j                  «      }|�Œ!t        |«        y t        | |D �cg c]'  }|j                  ||j                     j                  f‘Œ) c}«       |rt        | |«       |rt        | |«       |D �cg c]  }|j!                  «       ‘Œ c}|dœ| j                   j                  j                  d<   t#        | «      }t%        | |||rdnt&        «       |rt)        | |«       |r)t+        | |«       t        | dd«      xr t        | dd«      }nt        | d«      }|€t        | d«      }t        | d«      }d| j                   j                  j,                  v }|s|€|du r	 y|rR| j                   j                  j                  d	   j,                  d   | j                   j                  j,                  d<   yt/        | «       yc c}w c c}w )Nr„   TÚslotsÚauto_attribsr…   FÚ
match_argsé   éÿÿÿÿrÉ   Úattrs©Ú
attributesÚfrozenrr   ÚhashÚunsafe_hashr»   Ú__hash__)r¬   r‚   r3   Ú_get_frozenrÀ   r½   ÚmrorÊ   Ú_analyze_classÚgetr€   Ú_add_empty_metadataÚ_add_attrs_magic_attributer�   Ú
_add_slotsÚ_add_match_argsr¨   ÚMethodAdderÚ	_add_initri   Ú
_add_orderÚ_make_frozenÚnamesÚ_remove_hashability)rš   rÑ   rÒ   rÓ   r‚   r„   rÞ   r¼   rÖ   r×   r…   rØ   Ú
super_inforÝ   Úattrr–   ÚadderÚhashabler»   Úhas_own_hashs                       rq   rÐ   rÐ   R  s„  € ð �7‰7�<‰<€Dä'¨¨V°TÓ:€DÜ˜˜nÓ-€FÜ Ó$€EÜ(¨¨g°}ÓE€Eä8¸¸nÐNbÓc€LÜ*¨3°	¸5ÓA€GÜ-¨c°<ÀÓF€Jà—g‘g—l‘l×&Ñ& q¨Ð,ò ˆ
Ø˜*×-Ñ-Ò-°'À×ATÑATÒ2Táðô
    \°7Ó;€Jð ò ˆØ�x‰x˜Ÿ	™	Ó"ˆØ‰<ô   Ô%Ùðô ˜sÐS]Ö$^È4 d§i¡i°°d·i±i±×1EÑ1EÒ%FÒ$^Ô_ÙÜ�3˜
Ô#ÙÜ˜˜ZÔ(ð 5?Ö?¨D�t—~‘~Õ'Ò?Øñ&€C‡G�G‡L�L×Ñ˜'Ñ"ô
 ˜Ó€Eäˆc�:˜u±D¡j¼oÔNáÜ�3˜ÔÙÜ�S˜*Ô%ä <Ø�˜ó!
ò !Eä*¨3°¸tÓDñ 	ô 9¸¸mÓLˆØÐÜ<¸SÀ&ÓIˆHä	.¨s°DÓ	9€BØ §¡§¡×!3Ñ!3Ð3€Lá˜Ð(¨R°5©[Øð ñ 
à),¯©¯©×)9Ñ)9¸"Ñ)=×)CÑ)CÀJÑ)Oˆ�‰�‰×Ñ˜:Ñ&ð ô 	˜CÔ àùòQ %_ùò @s   Ã>,J
ÅJ c                ó¶   — t        | d|«      ry| j                  j                  j                  dd D ]%  }d|j                  v sŒ|j                  d   d   sŒ% y y)z$Return whether this class is frozen.rÞ   TrÙ   rÚ   rÛ   F)r3   r¬   r‚   rã   rÊ   )rš   rÒ   rð   s      rq   râ   râ   ž  s]   € ä# C¨°>ÔBØà—g‘g—l‘l×&Ñ& q¨Ð,ò ˆ
Ø�j×)Ñ)Ò)¨j×.AÑ.AÀ'Ñ.JÈ8Ó.TÙðð rs   c                óò  — i }|€t        | «      }| j                  j                  j                  D ]o  }t	        |t
        «      r@t        | |||«      D ].  }|s|j                  |v r||j                  = |||j                  <   Œ0 ŒSt	        |t        «      sŒdt        ||«       Œq |j                  «       D ]•  }|j                  | j                  j                  j                  v sŒ0| j                  j                  j                  |j                     j                  }t	        |t        «      rŒxt	        |t        «      sJ |«       ‚d|_        Œ— t#        |«      }g }	| j                  j                  j$                  dd D ]Ð  }
d|
j&                  v sŒ| j(                  j+                  t-        |
j.                  «      «       |
j&                  d   d   D ]|  }|d   |vsŒt0        j3                  |
|| j(                  «      }|j5                  | j                  j                  «       |	j7                  |«       |j9                  |j                  «       Œ~ ŒÒ |	t;        |j                  «       «      z   }d}t=        |«      D ]~  \  }}|j>                  sŒ|j@                  rŒ |tC        |	«      k\  r|jD                  n| j                  }|jF                  s|r| j(                  jI                  d|«       ||jF                  z  }Œ€ |S )ab  Analyze the class body of an attr maker, its parents, and return the Attributes found.

    auto_attribs=True means we'll generate attributes from type annotations also.
    auto_attribs=None means we'll detect which mode to use.
    class_kw_only=True means that all attributes created here will be keyword only args by
        default in __init__.
    FrÙ   rÚ   rÛ   rÝ   r€   z<Non-default attributes not allowed after default attributes.)%Ú_detect_auto_attribsr¬   ÚdefsÚbodyr’   r   Ú_attributes_from_assignmentr€   r   Ú_cleanup_decoratorÚvaluesr‚   rî   r–   r&   r.   Úis_initialized_in_classÚsetrã   rÊ   r�   Úadd_plugin_dependencyr7   rÅ   r~   r°   r³   ÚappendÚaddÚlistÚ	enumerater„   r…   rŠ   r‡   rƒ   rŽ   )rš   r×   Úclass_kw_onlyÚ	own_attrsÚstmtrñ   Ú	attributer–   Útaken_attr_namesÚsuper_attrsrð   r­   ÚarÝ   Úlast_defaultÚir‡   s                    rq   rä   rä   ©  s   € ð ')€IØÐÜ+¨CÓ0ˆð —‘—‘×!Ñ!ò 0ˆÜ�dœNÔ+Ü3°C¸¸|È]Ó[ò ,�ñ
 $¨¯	©	°YÑ(>Ø! $§)¡)Ð,Ø'+�	˜$Ÿ)™)Ò$ñ,ô ˜œiÕ(Ü˜t YÕ/ð0ð ×%Ñ%Ó'ò 	1ˆ	ð �>‰>˜SŸW™WŸ\™\×/Ñ/Ò/Ø—7‘7—<‘<×%Ñ% i§n¡nÑ5×:Ñ:ˆDÜ˜$¤Ô0àÜ˜d¤CÔ(Ð.¨$Ó.Ð(Ø+0ˆDÕ(ð	1ô ˜9“~ÐØ€KØ—g‘g—l‘l×&Ñ& q¨Ð,ò 1ˆ
Ø�j×)Ñ)Ò)à�G‰G×)Ñ)Ô*?À
×@SÑ@SÓ*TÔUà"×+Ñ+¨GÑ4°\ÑBò 1�ð ˜‘<Ð'7Ò7Ü!×-Ñ-¨j¸$ÀÇÁÓH�AØ×1Ñ1°#·'±'·,±,Ô?Ø×&Ñ& qÔ)Ø$×(Ñ(¨¯©Õ0ñ1ð1ð œt I×$4Ñ$4Ó$6Ó7Ñ7€Jð €Lä! *Ó-ò .‰ˆˆ9Ø�~Š~Øà×Òàð ()¬C°Ó,<Ò'<�)×#Ò#À#Ç'Á'ˆà×$Ò$©Ø�G‰G�L‰LÐWÐY`ÔaØ˜	×-Ñ-Ñ-‰ð.ð  Ðrs   c                ó(   — g ddœ| j                   d<   y)zEAdd empty metadata to mark that we've finished processing this class.FrÜ   rÛ   N)rÊ   )r‚   s    rq   ræ   ræ   ù  s   € à,.¸%Ñ@€D‡M�M�'Òrs   c                óº  — | j                   j                  j                  D ]¸  }t        |t        «      sŒ|j
                  D ]–  }t        ||«      \  }}t        |«      t        |«      k7  rŒ*t        ||«      D ]^  \  }}t        |t        «      sŒt        |j                  t        «      sŒ2|j                  j                  t        v sŒO|j                  rŒ\   y Œ˜ Œº y)zyReturn whether auto_attribs should be enabled or disabled.

    It's disabled if there are any unannotated attribs()
    FT)r¬   rø   rù   r’   r   ÚlvaluesÚ_parse_assignmentsrŠ   r‹   r   Úcalleer'   rÅ   ra   Ú
new_syntax)rš   r  Úlvaluer  ÚrvaluesÚlhsÚrvalues          rq   r÷   r÷   þ  s¼   € ð
 —‘—‘×!Ñ!ò %ˆÜ�dœNÕ+ØŸ,™,ò %�Ü#5°f¸dÓ#CÑ �˜ä�w“<¤3 w£<Ò/ð ä#& w°Ó#8ò 
%‘K�C˜ô # 6¬8Õ4Ü& v§}¡}´gÕ>Ø"ŸM™M×2Ñ2Ô6HÒHØ $§£ó  %ñ
%ñ%ð%ð* rs   c           
   #  óÔ  K  — |j                   D ]Õ  }t        ||«      \  }}t        |«      t        |«      k7  rŒ*t        ||«      D ]�  \  }}t	        |t
        «      rNt	        |j                  t        «      r4|j                  j                  t        v rt        | |||||«      }	|	sŒ_|	–— Œd|sŒg|j                  sŒt|j                  sŒ�t        |«      rŒ�t        | ||||«      –— ŒŸ Œ× y­w)a@  Return Attribute objects that are created by this assignment.

    The assignments can look like this:
        x = attr.ib()
        x = y = attr.ib()
        x, y = attr.ib(), attr.ib()
    or if auto_attribs is enabled also like this:
        x: type
        x: type = default_value
        x: type = attr.ib(...)
    N)r  r  rŠ   r‹   r’   r   r  r'   rÅ   ra   Ú_attribute_from_attrib_makerr�   r  r/   Ú_attribute_from_auto_attrib)
rš   r  r×   r  r  r  r  r  r  rñ   s
             rq   rú   rú     sØ   è ø€ ð —,‘,ò YˆÜ-¨f°dÓ;Ñˆ�äˆw‹<œ3˜w›<Ò'ð ä˜w¨Ó0ò 	Y‰KˆC�ô ˜6¤8Ô,Ü˜vŸ}™}¬gÔ6Ø—M‘M×*Ñ*Ô.@Ñ@ä3Ø˜ }°c¸6À4ó�ò Ø“JÚ $§)£)°·³ÌÐUXÕHYÜ1°#°}ÀcÈ6ÐSWÓXÓXñ	YñYùs$   ‚B!C(Â$C(Â,C(Â9C(ÃC(ÃC(c                ó’  — g }| j                   D ]”  }t        |t        «      sŒt        |j                  t        «      sŒ/|j                  j
                  |v sŒH|j
                  dk(  rd||j                  j
                     _        |j
                  dv sŒ„|j                  |«       Œ– |D ]  }| j                   j                  |«       Œ y)z©Handle decorators in class bodies.

    `x.default` will set a default value on x
    `x.validator` and `x.default` will get removed to avoid throwing a type error.
    rÆ   T)rÆ   Ú	validatorN)	Ú
decoratorsr’   r#   Úexprr$   r€   rƒ   r   Úremove)r  Úattr_mapÚ	remove_meÚfunc_decoratorÚdecs        rq   rû   rû   A  s³   € ð €IØŸ/™/ò 1ˆä�~¤zÕ2Ü˜>×.Ñ.´Õ9Ø×#Ñ#×(Ñ(¨HÒ4à×"Ñ" iÒ/ØAE�˜×,Ñ,×1Ñ1Ñ2Ô>à×"Ñ"Ð&>Ò>ð × Ñ  Õ0ð%1ð& ò $ˆØ�‰×Ñ˜sÕ#ñ$rs   c                ó  — t        |j                  «      }t        |t        «       }| j                  j
                  j                  j                  |«      }|r|j                  nd}t        |d| j                  j
                  |d|d||«	      S )z.Return an Attribute for a new type assignment.NT)
rP   r€   r’   r)   r¬   r‚   rî   rå   r�   r~   )	rš   r  r  r  r  r€   Úhas_rhsÚsymrn   s	            rq   r  r  _  sq   € ô �C—H‘HÓ€Dä˜V¤XÓ.Ð.€GØ
�'‰'�,‰,×
Ñ
×
 Ñ
  Ó
&€CÙ�—’ T€IÜ�T˜4 §¡§¡¨w¸¸mÈTÐSWÐYbÓcÐcrs   c                ó„  — |rK|j                   s?|j                  €J ‚| j                  j                  j	                  |j                  |«       yt        |j                  «      dkD  r| j                  j                  d|«       y|j                  }t        | |dd«      }t        | |d|«      }t        t        |d«      «      }	t        t        |d«      «      }
|	r|
r| j                  j                  d	|«       n|
rd}	t        |d
«      }|rž|sœ	 t        || j                  j                  | j                  j                  «      }| j                  j                  |«      }|rIt!        |j                  t"        «      r/|j                  j                  s||j                  _        d|_        	 t        |d«      }t        |d«      }|r|r| j                  j                  d|«       n |r| j                  j                  d|«       |}t)        | |«      }d}t        |d«      }|r?| j                  j+                  |«      }|€"| j                  j                  d|t,        ¬«       t/        |j0                  «      }t3        ||| j4                  j6                  |	|||||«	      S # t&        $ r  | j                  j                  d|«       Y �Œw xY w)zFReturn an Attribute from the assignment or None if you can't make one.NrÙ   z Too many names for one attributer„   Tr…   rÆ   Úfactoryz(Can't pass both "default" and "factory".r�   FzInvalid argument to typer†   Úconvertz*Can't pass both "convert" and "converter".z$convert is deprecated, use converterr�   z8"alias" argument to attrs field must be a string literalrÃ   )r  r–   r�   r—   r˜   rŠ   r  rŽ   r�   r2   rµ   r1   r   r”   Úis_stub_fileÚ	anal_typer’   r.   Úis_inferred_defr   Ú_parse_converterÚparse_str_literalr   rP   r€   r~   r¬   r‚   )rš   r×   r  r  r  r  rn   r„   r…   Úattr_has_defaultÚattr_has_factoryÚtype_argÚun_typer†   r(  Úconverter_infor�   Ú
alias_exprr€   s                      rq   r  r  o  sZ  € ñ ˜DŸOšOà�x‰xÐ#Ð#Ð#Ø�‰�‰×+Ñ+¨C¯H©H°dÔ;Øä
ˆ4�<‰<Ó˜1ÒØ�‰�‰Ð7¸Ô>Øð —	‘	€Iô ˜c 6¨6°4Ó8€Dô !  f¨i¸ÓG€Gô œM¨&°)Ó<Ó=ÐÜœM¨&°)Ó<Ó=ÐáÑ,Ø�‰�‰Ð@À&ÕIÙ	ØÐô ˜V VÓ,€HÙ™	ð		,Ü-¨h¸¿¹¿¹ÈÏÉ×I]ÑI]Ó^ˆGð Ÿ™×)Ñ)¨'Ó2ˆIÙœZ¨¯©´#Ô6¸s¿x¹x¿}º}à )�—‘”Ø&+�Õ#ô ˜f kÓ2€IÜ˜F IÓ.€GÙ‘9Ø�‰�‰ÐBÀFÕKÙ	Ø�‰�‰Ð;¸VÔDØˆ	Ü% c¨9Ó5€Nð €EÜ˜v wÓ/€JÙØ—‘×)Ñ)¨*Ó5ˆØˆ=Ø�G‰G�L‰LØJØÜ ð ô ô
 �C—H‘HÓ€DÜØˆe�S—W‘W—\‘\Ð#3°T¸7ÀNÐTXÐZcóð øô? $ò 	?Ø�G‰G�L‰LÐ3°X×>ð	?ús   Ä5J Ê%J?Ê>J?c                ó  — |syt        «       }t        |t        «      rct        |j                  t        «      rI|j                  j
                  t        v r-|j                  r!|j                  d   r|j                  d   }d}nd}d}t        |t        «      �r|j                  �rt        |j                  t        «      rr|j                  j                  r<t        |j                  j                  t        «      r|j                  j                  }�nqt        t        j                  «      |_        |S t        |j                  t         «      r-t#        |j                  «      r|j                  j                  }�n
t        |j                  t$        «      rðt'        |j                  «      }nÚt        |t(        «      rÊt        |j*                  t,        «      r°t        |j.                  t        «      r–t        |j.                  j                  t$        «      rrt'        |j.                  j                  «      }t        |t0        «      rAt3        ||j*                  j4                  | j6                  j8                  j:                  |«      }nd}t        |t<        «      r t        t        j                  «      |_        |S |s<| j6                  j?                  d|«       t        t        j@                  «      |_        |S tC        |«      }t        |t0        «      r4|jD                  r(|jD                  d   |_        |s¢|jF                  |_#        n�t        |tH        «      r€g }|jJ                  D ]]  }tM        |jD                  «      }|sŒ|dkD  r tO        d„ |jP                  dd D «       «      rŒ@|jS                  |jD                  d   «       Œ_ |rtU        |«      |_        |r:|j                  r.tW        jX                  |j                  t[        «       g«      |_        |S )z/Return the Converter object from an Expression.Nr   TFzVUnsupported converter, only named functions, types and lambdas are currently supportedrÙ   c              3  ó.   K  — | ]  }|t         k(  –— Œ y ­wrm   )r   )Ú.0Úkinds     rq   ú	<genexpr>z#_parse_converter.<locals>.<genexpr>  s   è ø€ Ò(X¸T¨´­Ñ(Xùs   ‚).rk   r’   r   r  r'   rÅ   rb   Úargsr–   r   r�   r?   r=   rG   r‘   rn   r%   Úis_valid_overloaded_converterr,   r<   r   Úanalyzedr+   Úbaser>   r   Útypesr�   r—   Úincompatible_typevar_valuer!   rŽ   r�   rM   Ú	arg_typesro   rC   ÚitemsrŠ   r¾   Ú	arg_kindsr   r:   rL   Ú
make_unionrB   )rš   Úconverter_exprr2  Úis_attr_converters_optionalÚconverter_typer=  ÚitemÚnum_arg_typess           rq   r,  r,  ½  s,  € ñ
 ØÜ“[€Nä�>¤8Ô,Ü�~×,Ñ,¬gÔ6Ø×!Ñ!×*Ñ*Ô.FÑFØ×ÒØ×Ñ Ò"ð (×,Ñ,¨QÑ/ˆØ&*Ñ#à&+Ð#à"&€NÜ�.¤'Õ*¨~×/BÓ/BÜ�n×)Ñ)¬7Ô3Ø×"Ñ"×'Ò'¬J°~×7JÑ7J×7OÑ7OÔQ]Ô,^Ø!/×!4Ñ!4×!9Ñ!9’ä+2´9×3HÑ3HÓ+I�Ô(Ø%Ð%Ü˜×+Ñ+Ô->Ô?ÔDaØ×ÑôE
ð ,×0Ñ0×5Ñ5ŠNÜ˜×+Ñ+¬XÔ6Ü-¨n×.AÑ.AÓB‰Nä�>¤9Ô-Ü�~×.Ñ.´Ô@Ü�~×*Ñ*¬GÔ4Ü�~×*Ñ*×/Ñ/´Ô:ô *¨.×*=Ñ*=×*BÑ*BÓCˆÜ�n¤lÔ3Ü4ØØ×'Ñ'×-Ñ-Ø—‘—‘×6Ñ6Øó	‰Nð "ˆNä�.¤*Ô-ä#*¬9×+@Ñ+@Ó#AˆÔ ØÐáà�‰�‰ðàô	
ô
 $+¬9×+?Ñ+?Ó#@ˆÔ ØÐä$ ^Ó4€NÜ�.¤,Ô/°N×4LÒ4LØ#1×#;Ñ#;¸AÑ#>ˆÔ Ù*Ø&4×&=Ñ&=ˆNÕ#Ü	�N¤JÔ	/ØˆØ"×(Ñ(ò 	,ˆDä §¡Ó/ˆMÙ ØØ˜qÒ ¤SÑ(XÀTÇ^Á^ÐTUÐTVÐEWÔ(XÔ%XØØ�L‰L˜Ÿ™¨Ñ*Õ+ð	,ñ Ü'<¸UÓ'CˆNÔ$á" ~×'?Ò'?ô $-×#7Ñ#7¸×9QÑ9QÔS[ÓS]Ð8^Ó#_ˆÔ àÐrs   c                ó:   — t        d„ | j                  D «       «      S )Nc              3  óŠ   K  — | ];  }t        |t        «       xs$ t        |j                  j                  t        «      –— Œ= y ­wrm   )r’   r   Úfuncr�   r?   ©r6  rF  s     rq   r8  z0is_valid_overloaded_converter.<locals>.<genexpr>  s9   è ø€ ò àô ˜œiÓ(Ð	(Ò	T¬J°t·y±y·~±~Ä|Ó,TÓ	Tñùó   ‚AA)Úallr@  )Údefns    rq   r:  r:    s    € Üñ à—J‘Jôó ð rs   c                ól  — g }g }t        | t        t        f«      rwt        d„ | j                  D «       «      r!t        t        t           | j                  «      }t        |j                  t        t        f«      r|j                  j                  }||fS t        | t        «      r| g}|j                  g}||fS )zSConvert a possibly complex assignment expression into lists of lvalues and rvalues.c              3  ó<   K  — | ]  }t        |t        «      –— Œ y ­wrm   )r’   r$   rK  s     rq   r8  z%_parse_assignments.<locals>.<genexpr>+  s   è ø€ ÒC¨dŒz˜$¤×)ÑCùs   ‚)	r’   r*   r"   rM  r@  r
   r  r$   r  )r  r  r  r  s       rq   r  r  $  s›   € ð !€GØ "€GÜ�&œ9¤hÐ/Ô0ÜÑC°f·l±lÔCÔCÜœ4¤™>¨6¯<©<Ó8ˆGÜ�d—k‘k¤I¬xÐ#8Ô9Ø—k‘k×'Ñ'ˆGð �GÐÐô 
�FœHÔ	%Ø�(ˆØ—;‘;�-ˆØ�GÐÐrs   rê   c           
     ó  — | j                   j                  d«      }| j                   j                  d«      }| j                  j                  j                  › dt
        › �}t        t
        |t        dd¬«      g |t        t        j                  «      ¬«      }t        t
        |g |t        t        j                  «      «      }t        t        |«      | j                  j                  j                  t
        <   dD ]‹  }| j                  j                  j                  › d|› �}|j                  t        |j                   j"                  |¬«      ¬	«      }t%        t'        d
|«      |dt(        «      g}	|j+                  ||	|||¬«       Œ� y)z1Generate all the ordering methods for this class.zbuiltins.boolzbuiltins.objectú.rÚ   Ú )Ú	namespace)rŒ   rü   Úupper_boundrÆ   )Ú__lt__Ú__le__Ú__gt__Ú__ge__)rŒ   ÚotherN)Ú	self_typeÚtvd)r�   Ú
named_typer¬   r‚   rÅ   rd   rJ   rI   r=   rG   Úfrom_omitted_genericsr-   r(   r   rî   Úcopy_modifiedrŒ   Úraw_idr   r.   r   Ú
add_method)
rš   rò   Ú	bool_typeÚobject_typerÅ   r\  Úself_tvar_exprÚmethodrT  r9  s
             rq   rì   rì   5  sC  € à—‘×"Ñ" ?Ó3€IØ—'‘'×$Ñ$Ð%6Ó7€Kð
 —'‘'—,‘,×'Ñ'Ð(¨¬.Ð)9Ð:€HÜ
ÜØä�R 2Ô&ØØÜœ	×7Ñ7Ó8ô€Cô !Ü˜ " k´7¼9×;ZÑ;ZÓ3[ó€Nô *9¼¸~Ó)N€C‡G�G‡L�L×Ñ”~Ñ&à:ò JˆØ—w‘w—|‘|×,Ñ,Ð-¨Q¨v¨hÐ7ˆ	Ø×Ñ¤9¨S¯V©V¯]©]ÀiÔ#PÐÓQˆÜœ˜W cÓ*¨C°´wÓ?Ð@ˆØ×Ñ˜  y¸CÀSÐÕIñ	Jrs   c                óp  — |D �]0  }|j                   | j                  j                  j                  v rP| j                  j                  j                  |j                      j                  }t        |t        «      sŒxd|_        Œ€t        |j                   |j                  «      }| j                  j                  |_        | j                  j                  j                  › d|j                   › �|_
        t        t        |«      | j                  j                  j                  |j                   <   d|_        �Œ3 y)zCTurn all the attributes into properties to simulate frozen classes.TrR  N)r€   r¬   r‚   rî   r–   r’   r.   Úis_propertyrn   rÅ   Ú	_fullnamer(   r   )rš   rÝ   r  r–   Úvars        rq   rí   rí   S  sÚ   € àó #ˆ	Ø�>‰>˜SŸW™WŸ\™\×/Ñ/Ñ/à—7‘7—<‘<×%Ñ% i§n¡nÑ5×:Ñ:ˆDÜ˜d¤CÔ(ð Ø#ˆDÕô �i—n‘n i×&9Ñ&9Ó:ˆCØ—w‘w—|‘|ˆCŒHØ"Ÿw™wŸ|™|×4Ñ4Ð5°Q°s·x±x°jÐAˆCŒMÜ+:¼4ÀÓ+EˆC�G‰G�L‰L×Ñ˜sŸx™xÑ(Ø"ˆCŽOñ##rs   c                óÀ  — g }g }| j                   j                  j                  }|D ]¶  }|j                  sŒ|j                  r!|j                  |j                  | «      «       n |j                  |j                  | «      «       |j                  rŒj|j                  |v sŒy||j                     j                  }t        |t        «      sŒ£|j                  sŒ°d|_        Œ¸ ||z   }	t        d„ |	D «       «      rM|	D ]H  }
t        t         j"                  «      |
j$                  _        t        t         j"                  «      |
_        ŒJ |j+                  ||	t-        «       «       y)zGGenerate an __init__ method for the attributes and add it to the class.Tc              3  óŠ   K  — | ];  }|j                   j                  xr t        |j                   j                  «      –— Œ= y ­wrm   )Úvariabler�   rN   )r6  rž   s     rq   r8  z_add_init.<locals>.<genexpr>„  s2   è ø€ Ò
WÈ3ˆ3�<‰<×ÑÒFÔ!3°C·L±L×4EÑ4EÓ!FÓFÑ
WùrL  N)r¬   r‚   rî   r„   r…   r   r¢   rƒ   r€   r–   r’   r.   Úis_finalÚfinal_set_in_initrM  r=   rG   Úimplementation_artifactrl  r�   Útype_annotationra  rB   )rš   rÝ   rò   Úmethod_nameÚpos_argsÚkw_only_argsÚ	sym_tabler  Úsym_noder9  r
  s              rq   rë   rë   i  s$  € ð €HØ€LØ—‘—‘×"Ñ"€IØò 2ˆ	Ø�~Š~ØØ×ÒØ×Ñ 	× 2Ñ 2°3Ó 7Õ8à�O‰O˜I×.Ñ.¨sÓ3Ô4ð ×$Ó$¨¯©¸9Ò)DØ  §¡Ñ0×5Ñ5ˆHÜ˜(¤CÕ(¨X×->Ó->Ø-1�Õ*ð2ð �lÑ"€DÜ
Ñ
WÐRVÔ
WÔWð ò 	KˆAÜ%¤i×&GÑ&GÓHˆA�J‰JŒOÜ '¬	×(IÑ(IÓ JˆAÕð	Kð 
×Ñ�[ $¬«
Õ3rs   c           	     óî  — t        t        j                  «      }|D ��cg c]*  \  }}| j                  j	                  d|xs |g«      xs |‘Œ, }}}| j                  j                  d| j                  j	                  d|g«      xs |g«      }t        j                  | j                  j                  j                  dd«      «      }| j                  j                  ||d«      }t        ||«      D ]m  \  \  }	}}t        |	|«      }
|	|
_        d|
_        t!        |«      }t#        |t$        «      r|j&                  |
_        t+        t,        |
d¬«      |j.                  |	<   Œo t%        |g «      }t+        t,        |d¬«      | j                  j(                  j.                  |<   t1        | j                  | j                  t2        t5        ||¬«      | j                  j                  › dt2        › �dd¬	«       y c c}}w )
Nzattr.Attributeúbuiltins.tuplerR  r‰   r   T)Úplugin_generated©Úfallback)rÅ   Úoverride_allow_incompatibleÚis_classvar)r=   rG   Úexplicitr�   Únamed_type_or_noner]  rg   Úformatr¬   rÅ   ÚreplaceÚbasic_new_typeinfor‹   r.   rh  rg  rM   r’   r@   r�   r‚   r(   r   rî   r4   rf   rE   )rš   rÛ   Úany_typer‰   Ú	attr_typeÚattributes_typesÚfallback_typeÚ	attr_nameÚtir€   ri  r    Úattributes_types                rq   rç   rç   Ž  sÂ  € ô ”y×)Ñ)Ó*€Hð "÷$áˆAˆyð 	�‰×"Ñ"Ð#3°iÒ6KÀ8Ð5LÓMÒYÐQYÑYð$Ðñ $ð —G‘G×&Ñ&Ø˜3Ÿ7™7×5Ñ5Ð6FÈÈ
ÓSÒ_ÐW_Ð`ó€Mô -×3Ñ3°C·G±G×4DÑ4D×4LÑ4LÈSÐRUÓ4VÓW€IØ	�‰×	#Ñ	# I¨}¸aÓ	@€BÜ # EÐ+;Ó <ò KÑ‰	ˆˆq�9Ü�$˜	Ó"ˆØˆŒØˆŒÜ% iÓ0ˆÜ�k¤8Ô,Ø"×'Ñ'ˆCŒHÜ(¬¨sÀTÔJˆ�‰�ŠðKô ˜r 2Ó&€Oô %4´D¸"ÈtÔ$T€C‡G�G‡L�L×Ñ�yÑ!äØ�‰Ø�‰ÜÜÐ"¨_Ô=Ø—G‘G×$Ñ$Ð% Q¤Ð&7Ð8Ø$(Øöùó1$s   Ÿ/G1c                óÆ  — t        d„ | j                  j                  j                  dd D «       «      ry |D �ch c]  }|j                  ’Œ c}| j                  j                  _        t        |D �cg c]  }| j                  j                  d«      ‘Œ c}| j                  j                  d«      ¬«      }t        | j                  | j                  d|¬«       y c c}w c c}w )	Nc              3  ó8   K  — | ]  }|j                   d u –— Œ y ­wrm   )rÖ   )r6  Úps     rq   r8  z_add_slots.<locals>.<genexpr>¶  s   è ø€ Ò
;˜qˆ1�7‰7�dŒ?Ñ
;ùs   ‚rÙ   rÚ   úbuiltins.strrw  ry  Ú	__slots__©r�   r¬   r€   Útyp)
r¾   r¬   r‚   rã   r€   rÖ   rE   r�   r]  r4   )rš   rÝ   rñ   r‰   Ú
slots_types        rq   rè   rè   µ  sª   € Ü
Ñ
; C§G¡G§L¡L×$4Ñ$4°Q°rÐ$:Ô
;Ô;ð 	ð 1;Ö;¨˜$Ÿ)›)Ò;€C‡G�G‡L�LÔô Ø5?Ö@°ˆ�‰×	Ñ	˜NÕ	+Ò@Ø—‘×#Ñ#Ð$4Ó5ô€Jô ˜sŸw™w¨C¯G©G¸+È:ÖVùò <ùò 	As   ¹CÁ1"Cc                ó  — d| j                   j                  j                  vs-| j                   j                  j                  d   j                  r°| j                  j                  d«      }t        |D �cg c]A  }|j                  s3|j                  r'|j                  t        |j                  |¬«      ¬«      ‘ŒC c}| j                  j                  d«      ¬«      }t        | j                  | j                   d|¬«       y y c c}w )NÚ__match_args__rŒ  ry  )Úlast_known_valuerw  rŽ  )r¬   r‚   rî   rx  r�   r]  rE   r…   r„   r_  rA   r€   r4   )rš   rÝ   Ústr_typerñ   rØ   s        rq   ré   ré   Æ  sÌ   € à §¡§¡× 2Ñ 2Ñ2Ø�7‰7�<‰<×ÑÐ.Ñ/×@Ò@à—7‘7×%Ñ% nÓ5ˆÜð 'öàØ—|’|¨¯	ª	ð ×&Ñ&¼ÀDÇIÁIÐX`Ô8aÐ&Õbòð
 —W‘W×'Ñ'Ð(8Ó9ô
ˆ
ô 	 3§7¡7°·±Ð>NÐT^Ö_ð Aùòs   Á4ADc                ó^   — t        | j                  | j                  dt        «       dd¬«       y)z Remove hashability from a class.rá   T)r|  Úoverwrite_existingN)r4   r�   r¬   rB   rË   s    rq   rï   rï   ×  s"   € äØ�‰�—‘˜*¤h£j¸dÐW[örs   c                  ó<   — e Zd ZdZdd„Z	 	 d	 	 	 	 	 	 	 	 	 	 	 dd„Zy)rê   znHelper to add methods to a TypeInfo.

    ctx: The ClassDefCtx we are using on which we will add methods.
    c                óZ   — || _         t        |j                  j                  «      | _        y rm   )rš   rO   r¬   r‚   r[  )rp   rš   s     rq   rr   zMethodAdder.__init__æ  s   € ØˆŒÜ& s§w¡w§|¡|Ó4ˆ�rs   Nc           	     ó–   — |�|n| j                   }t        | j                  j                  | j                  j                  |||||«       y)zþAdd a method: def <method_name>(self, <args>) -> <ret_type>): ... to info.

        self_type: The type to use for the self argument or None to use the inferred self type.
        tvd: If the method is generic these should be the type variables.
        N)r[  r5   rš   r�   r¬   )rp   rq  r9  ro   r[  r\  s         rq   ra  zMethodAdder.add_methodê  s<   € ð "+Ð!6‘I¸D¿N¹Nˆ	ÜØ�H‰H�L‰L˜$Ÿ(™(Ÿ,™,¨°T¸8ÀYÐPSõ	
rs   ©rš   r·   rv   rw   rt   )rq  r´   r9  zlist[Argument]ro   rF   r[  ru   r\  zTypeVarType | Nonerv   rw   )rx   ry   rz   r{   rr   ra  r|   rs   rq   rê   rê   Þ  sS   „ ñó5ð "&Ø"&ð
àð
ð ð
ð ð	
ð
 ð
ð  ð
ð 
ô
rs   c                óD  — | j                   j                  t        «      }|�|j                  sy| j                   j	                  d«      xs | j                   j	                  t
        «      }t        |t        «      rt        |j                   t        «      sy|j                   S )zT
    If `typ` refers to an attrs class, get the type of its initializer method.
    Nrr   )	r�   rå   rf   rx  Ú
get_methodri   r’   r   r>   )r�  Ú
magic_attrÚinit_methods      rq   Ú_get_attrs_init_typerŸ  ý  sx   € ð —‘—‘œoÓ.€JØÐ ×!<Ò!<ØØ—(‘(×%Ñ% jÓ1ÒY°S·X±X×5HÑ5HÌÓ5Y€KÜ�k¤7Ô+´:¸k×>NÑ>NÔP\Ô3]ØØ×ÑÐrs   c                óV  — t        || j                  j                  «      }||u rt        |t        «      rd|› d�nd|› d�}nBt        || j                  j                  «      }t        |t        «      r	d|› d|› d�nd|› d|› d�}| j                  j                  || j                  «       y )	Nz,Argument 1 to "evolve" has a variable type "z" not bound to an attrs classz.Argument 1 to "evolve" has incompatible type "z"; expected an attrs classz!Argument 1 to "evolve" has type "z" whose item "z " is not bound to an attrs classz" is not an attrs class)r   r�   r”   r’   rJ   rŽ   r‡   )rš   ÚtÚparent_tÚt_namer—   Úpt_names         rq   Ú_fail_not_attrs_classr¥  
  s³   € Ü˜a §¡§¡Ó1€FØ�1�}ô ˜!œ[Ô)ð ;¸6¸(ÐB_Ñ`àAÀ&ÀÐIcÐdñ 	ô # 8¨S¯W©W¯_©_Ó=ˆô ˜!œ[Ô)ð 0°¨y¸ÀvÀhÐNnÑoàAÀ'ÀÈ.ÐY_ÐX`Ð`wÐxð 	ð ‡G�G‡L�L��c—k‘kÕ"rs   c                ó>  — t        |t        «      ryt        |t        «      r>g }|j                  «       D ]'  }t	        |«      }t        | |||«      }|�|�||z  }Œ&d}Œ) |S t        |t        «      r!t        | t	        |j                  «      ||«      S t        |t        «      rpt        |«      }|€t        | ||«       yt        ||«      }t        t        t           |j                  dd «      }|j                   dd }	t#        t%        ||	«      «      gS t        | ||«       y)a  
    For a given type, determine what attrs classes it can be: for each class, return the field types.
    For generic classes, the field types are expanded.
    If the type contains Any or a non-attrs type, returns None; in the latter case, also reports an error.
    NrÙ   )r’   r=   rL   Úrelevant_itemsrM   Ú_get_expanded_attr_typesrJ   rU  r@   rŸ  r¥  r   r
   r  r´   Ú	arg_namesr?  Údictr‹   )
rš   r�  Údisplay_typÚ
parent_typÚretrF  Ú
item_typesÚ	init_funcÚfield_namesÚfield_typess
             rq   r¨  r¨    s%  € ô �#”wÔØÜ	�CœÔ	#Ø/1ˆØ×&Ñ&Ó(ò 	ˆDÜ" 4Ó(ˆDÜ1°#°t¸TÀ:ÓNˆJØˆ :Ð#9Ø�zÑ!‘à‘ð	ð ˆ
Ü	�CœÔ	%Ü'Ø” §¡Ó1°;À
ó
ð 	
ô 
�CœÔ	"Ü(¨Ó-ˆ	ØÐÜ! # {°JÔ?ØÜ+¨I°sÓ;ˆ	äœ4¤™9 i×&9Ñ&9¸!¸"Ð&=Ó>ˆØ×)Ñ)¨!¨"Ð-ˆÜ”S˜ kÓ2Ó3Ð4Ð4ä˜c ;°
Ô;Ørs   c                óJ  — t        t        «      }| D ].  }|j                  «       D ]  \  }}||   j                  |«       Œ Œ0 |j                  «       D ��ci c]@  \  }}|t	        |«      t	        | «      k(  rt        t        t        |«      «      n	t        «       “ŒB c}}S c c}}w )zr
    "Meet" the fields of a list of attrs classes, i.e. for each field, its new type will be the lower bound.
    )	r   r  r@  r   rŠ   rM   r   r   rK   )r=  Úfield_to_typesÚfieldsr€   r�  Úf_typess         rq   Ú_meet_fieldsr¶  G  s¦   € ô !¤Ó&€NØò -ˆØŸ™›ò 	-‰IˆD�#Ø˜4Ñ ×'Ñ'¨Õ,ñ	-ð-ð ,×1Ñ1Ó3÷ñ ˆD�'ð 	ä�7‹|œs 5›zÒ)ô œF¤:¨wÓ7Ô8ä Ó"ñ	#óð ùó s   ÁABc           
     ó   — t        | j                  «      dk7  rJ| j                  j                  d| j                  j
                  › d�| j                  «       | j                  S t        | j                  d   «      dk7  r| j                  S | j                  d   d   }t        | j                  j                  |«      «      }t        || j                  j                  «      }t        | |||«      }|€| j                  S t        |«      }t        dg|j                  «       ¢t        gt         gt        |«      z  z   |g|j#                  «       ¢|| j                  j$                  | j                  j
                  › d|› �¬«      S )	z“
    Generate a signature for the 'attr.evolve' function that's specific to the call site
    and dependent on the type of the first argument.
    é   rÂ   z " has unexpected type annotationr   rÙ   Úinstz of )r©  rA  r?  ro   rz  r€   )rŠ   r9  r�   rŽ   Údefault_signaturer€   r‡   rM   Úget_expression_typer   r”   r¨  r¶  r>   Úkeysr   r   rü   rz  )rš   Úinst_argÚ	inst_typeÚinst_type_strÚ
attr_typesr´  s         rq   Úevolve_function_sig_callbackrÁ  Z  sL  € ô
 ˆ3�8‰8ƒ}˜Òà�‰�‰�q˜×.Ñ.×3Ñ3Ð4Ð4TÐUÐWZ×WbÑWbÔcØ×$Ñ$Ð$ä
ˆ3�8‰8�A‰;Ó˜1ÒØ×$Ñ$Ð$à�x‰x˜‰{˜1‰~€HÜ §¡× ;Ñ ;¸HÓ EÓF€IÜ$ Y°·±·±Ó@€Mä)¨#¨y¸)ÀYÓO€JØÐØ×$Ñ$Ð$Ü˜*Ó%€FäØÐ*˜FŸK™K›MÐ*Ü�)œ}˜o´°F³Ñ;Ñ;ØÐ/˜vŸ}™}›Ð/ØØ×&Ñ&×/Ñ/Ø×%Ñ%×*Ñ*Ð+¨4°¨Ð?ôð rs   c                ó*  — t        | j                  «      dk7  st        | j                  d   «      dk7  r| j                  S t        | j                  j                  | j                  d   d   «      «      }t        |t        «      s*t        |t        «      r&t        |j                  t        «      r| j                  S d}| j                  j                  }t        |t        «      r5t        |j                  «      }t        |t        «      r0|g}|j                  }n t        |t        «      r|j!                  «       }|�Pt"        |j$                  v r>|j$                  t"           j                  }|€J ‚| j                  j'                  ||¬«      S | j                  S )z)Provide the signature for `attrs.fields`.rÙ   r   N)r?  ro   )rŠ   r9  rº  rM   r�   r»  r’   r=   rH   rF  r?  rJ   rU  r@   r�   r>   Útype_objectrf   rî   r_  )rš   r    r¬   r?  Úinnerro   s         rq   Úfields_function_sig_callbackrÅ  z  sD  € ä
ˆ3�8‰8ƒ}˜ÒœS §¡¨!¡Ó-°Ò2Ø×$Ñ$Ð$ä! #§'¡'×"=Ñ"=¸c¿h¹hÀq¹kÈ!¹nÓ"MÓN€Kô 	�;¤Ô(Ü�k¤8Ô,Ü�{×'Ñ'¬Ô1à×$Ñ$Ð$à
€CØ×%Ñ%×/Ñ/€Iä�+œ{Ô+Ü × 7Ñ 7Ó8ˆÜ�eœXÔ&à$˜ˆIØ—*‘*‰CÜ	�K¤Ô	.Ø×%Ñ%Ó'ˆà
€œ?¨c¯i©iÑ7à—9‘9œ_Ñ-×2Ñ2ˆØÐ#Ð#Ð#Ø×$Ñ$×2Ñ2¸YÐQYÐ2ÓZÐZà× Ñ Ð rs   )rš   r·   rv   rµ   rm   )rš   r·   r€   r´   rÆ   úbool | Nonerv   rÆ  rš  )FFF)
rš   r·   rÑ   rÆ  rÒ   rµ   rÓ   rµ   rv   rµ   )rš   r·   rÒ   rµ   rv   rµ   )rš   r·   r×   rÆ  r  rµ   rv   úlist[Attribute])r‚   r,   rv   rw   )
rš   r·   r  r   r×   rµ   r  rµ   rv   zIterable[Attribute])r  r   r  zdict[str, Attribute]rv   rw   )rš   r·   r  rµ   r  r$   r  r   r  r   rv   r~   )rš   r·   r×   rµ   r  rµ   r  r$   r  r   r  r   rv   zAttribute | None)rš   r·   rC  zExpression | Nonerv   r¶   )rN  r%   rv   rµ   )r  r   r  r   rv   z'tuple[list[NameExpr], list[Expression]])rš   r·   rò   rê   rv   rw   )rš   r·   rÝ   rÇ  rv   rw   )
rš   r·   rÝ   rÇ  rò   rê   rq  z%Literal['__init__', '__attrs_init__']rv   rw   )rš   r·   rÛ   zlist[tuple[str, Type | None]]rv   rw   )r�  r@   rv   zCallableType | None)rš   úmypy.plugin.FunctionSigContextr¡  rF   r¢  rF   rv   rw   )
rš   rÈ  r�  rD   r«  rD   r¬  rD   rv   zlist[Mapping[str, Type]] | None)r=  zlist[Mapping[str, Type]]rv   zMapping[str, Type])rš   rÈ  rv   r>   )�r{   Ú
__future__r   Úcollectionsr   Úcollections.abcr   r   Ú	functoolsr   Útypingr   r	   r
   Úmypy.pluginÚmypyÚmypy.applytyper   Úmypy.errorcodesr   Úmypy.expandtyper   r   Úmypy.exprtotyper   r   Ú	mypy.meetr   Úmypy.messagesr   Ú
mypy.nodesr   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   Úmypy.plugins.commonr1   r2   r3   r4   r5   r6   Úmypy.server.triggerr7   Ú
mypy.stater8   Úmypy.typeopsr9   r:   r;   r<   Ú
mypy.typesr=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   Úmypy.typevarsrO   Ú	mypy.utilrP   rT   Ú__annotations__rU   rV   r[   ra   rb   rd   rf   rg   ri   rk   r~   rÀ   r½   rÌ   rÔ   rÐ   râ   rä   ræ   r÷   rú   rû   r  r  r,  r:  r  rì   rí   rë   rç   rè   ré   rï   rê   rŸ  r¥  r¨  r¶  rÁ  rÅ  r|   rs   rq   ú<module>rß     sì  ðÚ Då "å #ß -Ý ß 'Ñ 'ã Ý 2Ý 'ß @ß IÝ  Ý *÷÷ ÷ ÷ ÷ ÷ ÷ õ õ> 8÷÷ õ 6Ý ÷ó ÷÷ ÷ ÷ ÷ õ( (Ý ò GÐ �5Ó FØ 0Ð1Ð �uÓ 1Ø*¨NÐ;Ð �EÓ ;Ú\Ð �EÓ \Ú`Ð �EÓ `Ø#=Ð?ZÐ"[Ð ˜%Ó [à€�Ó Ø*€�Ó *Ø&>Ð ˜eÓ >Ø)€�Ó )÷!ñ !÷@"ñ @"óFð< IMðØ	$ðØ,/ðØ:Eðàóó8,ð ).Ø Øð	
Ø	$ð
à%ð
ð ð
ð ð	
ð
 
ó
ð<IØ	$ðIà%ðIð ðIð ð	Ið
 
óIóXðMØ	$ðMØ4?ðMØPTðMàóMó`Aó
ð:#YØ	$ð#YØ,:ð#YØJNð#YØ_cð#Yàó#YóL$ð<dØ	$ðdàðdð 
ðdð ð	dð
 ðdð ódð KØ	$ðKàðKð ðKð 
ð	Kð
 ðKð ðKð óKð\]Ø	$ð]Ø6Gð]àó]ó@ðØðØ,ðà,óó"Jó<#ð,"4Ø	$ð"4àð"4ð ð"4ð 7ð	"4ð
 
ó"4ðJ$Ø	$ð$Ø-Jð$à	ó$óNWó"`ó"÷
ñ 
ó>
ó#ð&'Ø	'ð'à	ð'ð ð'ð ð	'ð
 %ó'óTó&ô@!!rs   