ó
    Ð]jÝh  ã                  ó*  • S r SSKJr  SSKJrJrJrJrJr  SSK	J
r
  SSKJrJrJr  SSKJrJrJr  SSKJr  SSKJrJr  SS	KJr  SS
KJrJr  SSKJrJr  SSK J!r!J"r"J#r#J$r$  SSK%J&r&  SSK'J(r(J)r)  SSK*J+r+  SSK,J-r-J.r.  SSK/J0r0  SSK1J2r2  SSKJ3r3  SSK4J5r5  \(       a  SSKJ6r6   " S S\5      r7 " S S\5      r8S-S jr9S.S jr: " S S5      r;S r< " S S \35      r= " S! S"\55      r> " S# S$\$\)5      r? " S% S&\$\;5      r@ " S' S(\$\;5      rA " S) S*\;\(\S+9rBg,)/a  
Like described in the :mod:`parso.python.tree` module,
there's a need for an ast like module to represent the states of parsed
modules.

But now there are also structures in Python that need a little bit more than
that. An ``Instance`` for example is only a ``Class`` before it is
instantiated. This class represents these cases.

So, why is there also a ``Class`` class here? Well, there are decorators and
they change classes in Python 3.

Representation modules also define "magic methods". Those methods look like
``py__foo__`` and are typically mappable to the Python equivalents ``__call__``
and others. Here's a list:

====================================== ========================================
**Method**                             **Description**
-------------------------------------- ----------------------------------------
py__call__(arguments: Array)           On callable objects, returns types.
py__bool__()                           Returns True/False/None; None means that
                                       there's no certainty.
py__bases__()                          Returns a list of base classes.
py__iter__()                           Returns a generator of a set of types.
py__class__()                          Returns the class of an instance.
py__simple_getitem__(index: int/str)   Returns a a set of types of the index.
                                       Can raise an IndexError/KeyError.
py__getitem__(indexes: ValueSet)       Returns a a set of types of the index.
py__file__()                           Only on modules. Returns None if does
                                       not exist.
py__package__() -> List[str]           Only on modules. For the import system.
py__path__()                           Only on modules. For the import system.
py__get__(call_object)                 Only on instances. Simulates
                                       descriptors.
py__doc__()                            Returns the docstring for a value.
====================================== ========================================

é    )Úannotations)ÚListÚOptionalÚTupleÚTYPE_CHECKINGÚAny)Údebug)Úget_cached_parent_scopeÚexpr_is_dottedÚfunction_is_property)Úinference_state_method_cacheÚCachedMetaClassÚ&inference_state_method_generator_cache)Úcompiled)ÚLazyKnownValuesÚLazyTreeValue)ÚParserTreeFilter)ÚTreeNameDefinitionÚ	ValueName)Úunpack_arglistÚValuesArguments)ÚValueSetÚiterator_to_value_setÚ	NO_VALUESÚValueWrapper©ÚClassContext)ÚFunctionAndClassBaseÚFunctionMixin)Ú	Decoratee)ÚLazyGenericManagerÚTupleGenericManager)Úplugin_manager)Ú	Parameter)ÚBaseTreeParamName)ÚAbstractSignature)ÚInferenceStatec                  óN   ^ • \ rS rSrU 4S jr\S 5       r\U 4S j5       rSr	U =r
$ )Ú	ClassNameéD   c                ó<   >• [         TU ]  X25        X@l        Xl        g ©N)ÚsuperÚ__init__Ú_apply_decoratorsÚ_class_value)ÚselfÚclass_valueÚ	tree_nameÚname_contextÚapply_decoratorsÚ	__class__s        €ÚW/home/mande/repo/quber/.venv/lib/python3.13/site-packages/jedi/inference/value/klass.pyr.   ÚClassName.__init__E   s   ø€ Ü‰Ñ˜Ô1Ø!1ÔØ'Õó    c              #  ó  #   • SSK Jn  U" U R                  R                  U R                  U R                  5      nU H<  nU R
                  (       a$  UR                  S U R                  S9 S h  v•N   M8  Uv •  M>     g  N7f)Nr   )Útree_name_to_values)Úinstancer2   )Újedi.inference.syntax_treer;   Úparent_contextÚinference_stater3   r/   Ú	py__get__r0   )r1   r;   ÚinferredÚresult_values       r7   ÚinferÚClassName.inferJ   sp   é € õ 	CÙ&Ø×Ñ×/Ñ/°×1DÑ1DÀdÇnÁnóVˆó %ˆLØ×%×%Ø'×1Ñ1¸4ÈT×M^ÑM^Ð1Ð_×_Ò_à"Ô"ò	 %á_ùs   ‚A,B Á.A>Á/B c                óˆ   >• [         TU ]  nUS:X  a0  U R                  R                  5       nUc  U$ [	        U5      (       a  gU$ )NÚfunctionÚproperty)r-   Úapi_typer3   Úget_definitionr   )r1   Útype_Ú
definitionr6   s      €r7   rH   ÚClassName.api_typeW   sG   ø€ ä‘Ñ ˆØ�JÓØŸ™×6Ñ6Ó8ˆJØÑ!Ø�Ü# J×/Ñ/ð "Øˆr9   )r/   r0   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r.   r   rC   rG   rH   Ú__static_attributes__Ú__classcell__©r6   s   @r7   r)   r)   D   s0   ø† õ(ð
 ñ
#ó ð
#ð ôó ör9   r)   c                  óN   ^ • \ rS rSr  SU 4S jjrS rS rS rU 4S jrSr	U =r
$ )	ÚClassFilteréh   c                óZ   >• [         TU ]  UR                  5       UUUS9  Xl        XPl        g )N)Úuntil_positionÚorigin_scope)r-   r.   Ú
as_contextr0   Ú_is_instance)r1   r2   Únode_contextrX   rY   Úis_instancer6   s         €r7   r.   ÚClassFilter.__init__i   s7   ø€ ä‰ÑØ×"Ñ"Ó$ lØ)Ø%ð 	ñ 	
ð
 (ÔØ'Õr9   c           
     óŒ   • U Vs/ s H2  n[        U R                  UU R                  U R                  (       + S9PM4     sn$ s  snf )N)r2   r3   r4   r5   )r)   r0   Ú_node_contextr[   )r1   ÚnamesÚnames      r7   Ú_convert_namesÚClassFilter._convert_namess   sS   € ñ  ó
ò  �$ô Ø ×-Ñ-ØØ!×/Ñ/Ø%)×%6Ñ%6Ô!6ô	ñ
  ñ
ð 	
ùò 
s   …9Ac                ó–   • U R                   nUb:  XR                  :X  d  XR                  :X  a  g[        U R                  U5      nUb  M:  g)NTF)Ú_origin_scopeÚ_parser_scoper>   r
   Ú_parso_cache_node)r1   Únodes     r7   Ú_equals_origin_scopeÚ ClassFilter._equals_origin_scope}   sL   € Ø×!Ñ!ˆØÑØ×)Ñ)Ó)¨T×5HÑ5HÓ-HØÜ*¨4×+AÑ+AÀ4ÓHˆDð Óð r9   c                ó´   • UR                   R                  S5      (       + =(       d2    UR                   R                  S5      =(       d    U R                  5       $ )NÚ__)ÚvalueÚ
startswithÚendswithrj   )r1   rb   s     r7   Ú_access_possibleÚClassFilter._access_possible…   sC   € à—:‘:×(Ñ(¨Ó.Ô.÷ +°$·*±*×2EÑ2EÀdÓ2K÷ +Ø×(Ñ(Ó*ð	+r9   c                ó€   >• [         TU ]  U5      nU Vs/ s H  o R                  U5      (       d  M  UPM     sn$ s  snf r,   )r-   Ú_filterrq   )r1   ra   rb   r6   s      €r7   rt   ÚClassFilter._filterŠ   s4   ø€ Ü‘‘ Ó&ˆÙ!&ÓF¢˜×*?Ñ*?À×*E—¡ÑFÐFùÒFs   •;²;)r0   r[   )NNNF)rM   rN   rO   rP   r.   rc   rj   rq   rt   rQ   rR   rS   s   @r7   rU   rU   h   s)   ø† ØFJØ05÷(ò
òò+÷
Gó Gr9   rU   c                óô   • U  Hr  nUR                   S:X  d  M  UR                  S   R                  S:X  d  M4  UR                  S   R                  S:X  a    gUR                  S   R                  S:X  d  Mr    g   g	)
zŠ
Returns:

- ``True`` if ``@dataclass(init=True)``
- ``False`` if ``@dataclass(init=False)``
- ``None`` if not specified ``@dataclass()``
Úargumentr   Úinité   ÚFalseFÚTrueTN)ÚtypeÚchildrenrn   )Ú	arg_nodesÚarg_nodes     r7   Úinit_param_valuer€   �   sp   € ó ˆà�M‰M˜ZÕ'Ø×!Ñ! !Ñ$×*Ñ*¨fÕ4à× Ñ  Ñ#×)Ñ)¨WÓ4ÙØ×"Ñ" 1Ñ%×+Ñ+¨vÕ5Ùñ ð r9   c           
     ój  • / nU R                  5       R                  5       n[        UR                  5       S S9 Hõ  nUR                  R                  5       nUR                  S   nUR                  S:X  d  M>  UR                  S:X  d  MP  UR                  S   nUR                  S:X  a  UR                  S   R                  S:X  a  MŽ  [        UR                  5      S	:  a  S
nOUR                  S   nUR                  [        U R                  UR                  UR                  S   US95        M÷     U$ )a  
``cls`` is a :class:`ClassMixin`. The type is only documented as mypy would
complain that some fields are missing.

.. code:: python

    @dataclass
    class A:
        a: int
        b: str = "toto"

For the previous example, the param names would be ``a`` and ``b``.
c                ó   • U R                   $ r,   )Ú	start_pos)rb   s    r7   Ú<lambda>Ú+get_dataclass_param_names.<locals>.<lambda>´   s   € ¸$¿.º.r9   )Úkeyé   Ú	expr_stmtÚ	annassignÚ	atom_exprr   ÚClassVaré   Né   )r>   r3   Úannotation_nodeÚdefault_node)rZ   Úget_global_filterÚsortedÚvaluesr3   rI   r}   r|   rn   ÚlenÚappendÚDataclassParamNamer>   )ÚclsÚparam_namesÚfilter_rb   Údr‰   ri   Údefaults           r7   Úget_dataclass_param_namesr›   ¤   s
  € ð €KØ�n‰nÓ×0Ñ0Ó2€GÜ�w—~‘~Ó'Ñ-HÔIˆØ�N‰N×)Ñ)Ó+ˆØ—J‘J˜q‘Mˆ	Ø�6‰6�[Õ  Y§^¡^°{Õ%BØ×%Ñ% aÑ(ˆDØ�y‰y˜KÓ'¨D¯M©M¸!Ñ,<×,BÑ,BÀjÓ,PÙä�9×%Ñ%Ó&¨Ó*Ø‘à#×,Ñ,¨QÑ/�à×ÑÔ1Ø"×1Ñ1ØŸ.™.Ø )× 2Ñ 2°1Ñ 5Ø$ñ	 ö ñ Jð& Ðr9   c                  ó  • \ rS rSr% S\S'   S\S'   S\S'   S\S'   S\S'   S\S	'   S\S
'   S\S'   S rS rS rS r\	S 5       r
S r\" 5       S 5       r  S!S jrS"S jrS#S jrS rS rS$S jr\" SS9S 5       rS rS rS rS rg)%Ú
ClassMixinéÊ   r   Ú	tree_noder>   r'   r?   Úpy__bases__Úget_metaclassesÚget_metaclass_filtersÚget_metaclass_signaturesÚlist_type_varsc                ó   • g©NT© ©r1   s    r7   Úis_classÚClassMixin.is_classÔ   ó   € Ør9   c                ó   • gr¦   r§   r¨   s    r7   Úis_class_mixinÚClassMixin.is_class_mixin×   r«   r9   c                ó¸   • SSK Jn  SSKJn  U R	                  5       (       a  [        U" U 5      /5      $ [        U" U R                  U R                  X5      /5      $ )Nr   )ÚTreeInstance)Ú	TypedDict)Újedi.inference.valuer°   Újedi.inference.gradual.typingr±   Úis_typeddictr   r?   r>   )r1   Ú	argumentsr°   r±   s       r7   Ú
py__call__ÚClassMixin.py__call__Ú   sM   € Ý5å;Ø×Ñ×ÑÜ™Y t›_Ð-Ó.Ð.Ü™ d×&:Ñ&:¸D×<OÑ<OÐQUÓaÐbÓcÐcr9   c                óD   • [         R                  " U R                  S5      $ )Nr|   )r   Úbuiltin_from_namer?   r¨   s    r7   Úpy__class__ÚClassMixin.py__class__â   s   € Ü×)Ò)¨$×*>Ñ*>ÀÓGÐGr9   c                ó@   • [        X R                  R                  5      $ r,   )r   rŸ   rb   r¨   s    r7   rb   ÚClassMixin.nameå   s   € ä˜Ÿ~™~×2Ñ2Ó3Ð3r9   c                ó.   • U R                   R                  $ r,   )rb   Ústring_namer¨   s    r7   Ú
py__name__ÚClassMixin.py__name__é   s   € Ø�y‰y×$Ñ$Ð$r9   c              #  ó6  #   • U /nU v •  U R                  5        HQ  nUR                  5        H:  n UR                  nU" 5        H  nXQ;  d  M
  UR                  U5        Uv •  M!     M<     MS     g ! [         a     [
        R                  " SX5         Mh  f = f7f)Nz$Super class of %s is not a class: %s)r    rC   Ú	py__mro__r”   ÚAttributeErrorr	   Úwarning)r1   ÚmroÚlazy_clsr–   Ú
mro_methodÚcls_news         r7   rÃ   ÚClassMixin.py__mro__ì   s”   é € àˆfˆØŠ
ð ×(Ñ(Ö*ˆHð  —~‘~Ö'�ð*Ø!$§¡�Jñ $.¦<˜Ø"Õ-ØŸJ™J wÔ/Ø")œMó $0ó' (ò +øô &ó Uð	ô —M’MÐ"HÈ$×TðUüs-   ‚.B±A0½BÁ"BÁ0"BÂBÂBÂBNFc              #  ó`  #   • U(       a0  U R                  5       nU(       a  U R                  XR5       S h  v•N   U R                  5        HL  nUR                  5       (       a  UR	                  US9 S h  v•N   M1  [        XR                  5       UUS9v •  MN     U(       dˆ  U(       a€  SSKJn  U" U R                  S5      nX€:w  aa  [        / 5      n	UR                  U	5       H@  n
U
R	                  5       n[        US 5        [        US 5        [        US 5      nUc   eUv •  MB     g g g g  Nô N·7f)N)r]   )r\   rY   r]   r   )r¹   r|   )r¡   r¢   rÃ   Úis_compiledÚget_filtersrU   rZ   Újedi.inference.compiledr¹   r?   r   r¶   Únext)r1   rY   r]   Úinclude_metaclassesÚinclude_type_when_classÚmetaclassesr–   r¹   rJ   Úargsr<   Úinstance_filtersÚxs                r7   rÍ   ÚClassMixin.get_filters  s  é € æØ×.Ñ.Ó0ˆKÞØ×5Ñ5°kÓO×OÐOà—>‘>Ö#ˆCØ�‰× Ñ ØŸ?™?°{˜?ÐC×CÒCä!Ø§~¡~Ó'7Ø!-Ø +ñô ñ	 $ö Ö6ÝAÙ% d×&:Ñ&:¸FÓCˆEØ‹}ô ' rÓ*�Ø %× 0Ñ 0°Ö 6�HØ'/×';Ñ';Ó'=Ð$äÐ)¨4Ô0ÜÐ)¨4Ô0ÜÐ-¨tÓ4�AØ™=Ð(˜=Ø”Gò !7ð ð  7ˆ{ñ Pñ Dùs"   ‚3D.µD*¶>D.Á4D,Á5B6D.Ä,D.c                óÚ   • U R                  5        HW  n[        U[        5      (       d  M  [        UR                  [        5      (       d  M;  SUR                  R                  5       4s  $    g)NT)FN)r¡   Ú
isinstancer    Ú_wrapped_valueÚDataclassTransformerÚinit_mode_from_new)r1   Úmetas     r7   Ú$_has_dataclass_transform_metaclassesÚ/ClassMixin._has_dataclass_transform_metaclasses.  sU   € Ø×(Ñ(Ö*ˆDä˜4¤×+Ó+ä˜t×2Ñ2Ô4H×IÓIà˜T×0Ñ0×CÑCÓEÐEÒEñ +ð r9   c                ó:  • / nSnSn[        [        U R                  5       5      5       HÚ  nU(       de  [        U[        5      (       a   UR
                  (       a  SnUR
                  nO'[        U[        5      (       a  UR                  5       u  p#U(       a  Mo  U(       d  Mx  [        U[        5      (       d  M�  UR                  5       (       d  UR                  5       b  M·  U(       d  MÀ  UR                  [        U5      5        MÜ     U(       a  [        WU5      /$ / $ )zù
Returns: A non-empty list if the class has dataclass semantics else an
empty list.

The dataclass-like semantics will be assumed for any class that directly
or indirectly derives from the decorated class or uses the decorated
class as a metaclass.
FNT)ÚreversedÚlistrÃ   rØ   rÚ   Úinit_mode_from_init_subclassr�   rÝ   Ú
ClassValueÚinit_param_modeÚextendr›   ÚDataclassSignature)r1   r—   Úis_dataclass_transformÚdefault_init_moder–   s        r7   Ú#_get_dataclass_transform_signaturesÚ.ClassMixin._get_dataclass_transform_signatures9  sø   € ð ˆØ!&ÐØ,0ÐÜœD §¡Ó!1Ó2Ö3ˆCÞ)ô ˜sÔ$8×9Ñ9Ø×8×8à-1Ð*Ø(+×(HÑ(HÑ%ô ˜s¤J×/Ñ/ð ×@Ñ@ÓBñ >Ð*ö *Ù÷ 'Ð&Ü˜s¤J×/Ó/à×'Ñ'×)Ñ)Ø×+Ñ+Ó-Ó5×:KÐ:Kð ×"Ñ"Ü-¨cÓ2öñG 4öN "Ü& s¨KÓ8Ð9Ð9àˆIr9   c                óL  • U R                  5       nU(       a  U R                  U5      nU(       a  U$ [        / 5      nU R                  U5      n[	        U5      nU R                  5       nU(       a  U$ UR                  5        Vs/ s H  owR                  U 5      PM     sn$ s  snf r,   )r¡   r£   r   r¶   Úinit_or_new_funcré   Úget_signaturesÚbind)r1   rÒ   ÚsigsrÓ   r<   Ú
init_funcsÚdataclass_sigsÚsigs           r7   rí   ÚClassMixin.get_signaturesq  s�   € ð ×*Ñ*Ó,ˆÞØ×0Ñ0°Ó=ˆDÞØ�Ü˜rÓ"ˆØ—?‘? 4Ó(ˆÜ% hÓ/ˆ
à×AÑAÓCˆÞØ!Ð!à.8×.GÑ.GÔ.IÓJÒ.I s—H‘H˜T–NÑ.IÑJÐJùÒJs   ÂB!c                ó   • [        U 5      $ r,   r   r¨   s    r7   Ú_as_contextÚClassMixin._as_context„  s   € Ü˜DÓ!Ð!r9   c                óV   • U(       a  SU R                  5       -  $ U R                  5       $ )NzType[%s])rÀ   )r1   Úadd_class_infos     r7   Úget_type_hintÚClassMixin.get_type_hint‡  s$   € ÞØ §¡Ó 1Ñ1Ð1Ø�‰Ó Ð r9   ©rš   c                óX  • SSK Jn  U R                  5        H~  n[        U[        5      (       d    gUR
                  n[        U5      (       d    gUR                  5        H2  n[        XA5      (       a      g UR                  nU" 5       (       a      gM4     M€     g! [         a         gf = f)Nr   )ÚTypedDictClassFT)
r³   rý   r    rØ   r   Údatar   rC   r´   rÄ   )r1   rý   rÇ   rŸ   r–   Úmethods         r7   r´   ÚClassMixin.is_typeddictŒ  sŸ   € õ 	AØ×(Ñ(Ö*ˆHÜ˜h¬×6Ñ6ÙØ Ÿ™ˆIô " )×,Ñ,Ùà—~‘~Ö'�Ü˜c×2Ñ2Úð	$Ø ×-Ñ-�Fñ —x‘xÚ#ñ  ó (ñ +ð. øô &ó !ó !ð	!ús   Á6BÂ
B)Â(B)c                ó”   ^ ^^• SSK Jm  U(       d"  [        R                  " S5        [	        T /5      $ [	        UUU 4S jU 5       5      $ )Nr   ©ÚGenericClassz:Class indexes inferred to nothing. Returning class insteadc           	   3  óZ   >#   • U  H   nT" T[        TR                  US 95      v •  M"     g7f))Úcontext_of_indexÚindex_valueN)r!   Úcontext)Ú.0r  r  Úcontextualized_noder1   s     €€€r7   Ú	<genexpr>Ú+ClassMixin.py__getitem__.<locals>.<genexpr>¯  s=   øé € ð 	
ò  /�ñ ØÜ"Ø%8×%@Ñ%@Ø +ñ÷ð ò  /ùs   ƒ(+)Újedi.inference.gradual.baser  r	   rÅ   r   )r1   Úindex_value_setr	  r  s   ` `@r7   Úpy__getitem__ÚClassMixin.py__getitem__ª  s?   ú€ Ý<ÞÜ�MŠMÐVÔWÜ˜T˜FÓ#Ð#Üö 	
ñ  /ó	
ó 	
ð 		
r9   c                ó2   • SSK Jn  U" U [        U5      5      $ )Nr   r  )r  r  r"   )r1   Úgenerics_tupler  s      r7   Úwith_genericsÚClassMixin.with_genericsº  s   € Ý<ÙØÜ Ó/ó
ð 	
r9   c                óš   ^ ^• SSK Jn  U U4S jnT(       a*  [        U" T [        [	        U" 5       5      5      5      /5      $ [        T 15      $ )Nr   r  c               3  óˆ   >#   • TR                  5        H)  n TR                  U R                  5       [        5      v •  M+     g7f)a  
The TypeVars in the resulting classes have sometimes different names
and we need to check for that, e.g. a signature can be:

def iter(iterable: Iterable[_T]) -> Iterator[_T]: ...

However, the iterator is defined as Iterator[_T_co], which means it has
a different type var name.
N)r¤   ÚgetrÀ   r   )Útype_varr1   Útype_var_dicts    €€r7   Úremap_type_varsÚ3ClassMixin.define_generics.<locals>.remap_type_varsÄ  s7   øé € ð !×/Ñ/Ö1�Ø#×'Ñ'¨×(;Ñ(;Ó(=¼yÓIÔIò 2ùs   ƒ?A)r  r  r   r"   Útuple)r1   r  r  r  s   ``  r7   Údefine_genericsÚClassMixin.define_genericsÁ  sL   ù€ Ý<ö	Jö Ü™\ØÜ#¤E©/Ó*;Ó$<Ó=óð ó ð ô ˜˜ÓÐr9   r§   )NFTT)ÚreturnzTuple[bool, Optional[bool]])r  zList[DataclassSignature]©T)rM   rN   rO   rP   Ú__annotations__r©   r­   r¶   rº   rG   rb   rÀ   r   rÃ   rÍ   rÝ   ré   rí   rõ   rù   r   r´   r  r  r  rQ   r§   r9   r7   r�   r�   Ê   sÉ   ‡ ØƒNØÓØ#Ó#ØÓØÓØÓØ!Ó!ØÓòòòdòHð ñ4ó ð4ò%ñ ,Ó-ñ*ó .ð*ð@ :?ØFJôôB	ô6òpKò&"ô!ñ
 "¨%Ñ0ñó 1ðò:
ò 
õ r9   r�   c                ó^  • U R                  S5      n[        U5      S:X  a{  [        [        U5      5      n UR                  nUR                  5       R                  5       (       a5  UR                  R                  R                  S:X  a  U R                  S5      $ U$ U$ ! [         a     U$ f = f)Nr.   r‡   ÚobjectÚ__new__)
Úpy__getattribute__r“   rÏ   ÚiterÚclass_contextÚget_root_contextÚis_builtins_modulerb   r¿   rÄ   )rn   rð   rx   r&  s       r7   rì   rì   Ù  s©   € Ø×)Ñ)¨*Ó5€JÜ
ˆ:ƒ˜!ÓÜ”D˜Ó$Ó%ˆð		;Ø ×.Ñ.ˆMð ×-Ñ-Ó/×BÑB×DÑDØ×*Ñ*×/Ñ/×;Ñ;¸xÓGØ×/Ñ/°	Ó:Ð:ØÐˆ:Ðøô ó 	Øð Ðð	ús   ¶B Â
B,Â+B,c                  ó8   ^ • \ rS rSrSrU 4S jrS rS rSrU =r	$ )r•   iê  zD
Represent a field declaration on a class with dataclass semantics.
c                ó<   >• [         TU ]  X5        X0l        X@l        g r,   )r-   r.   rŽ   r�   )r1   r>   r3   rŽ   r�   r6   s        €r7   r.   ÚDataclassParamName.__init__ï  s   ø€ Ü‰Ñ˜Ô3Ø.ÔØ(Õr9   c                ó"   • [         R                  $ r,   )r$   ÚPOSITIONAL_OR_KEYWORDr¨   s    r7   Úget_kindÚDataclassParamName.get_kindô  s   € Ü×.Ñ.Ð.r9   c                ór   • U R                   c  [        $ U R                  R                  U R                   5      $ r,   )rŽ   r   r>   Ú
infer_noder¨   s    r7   rC   ÚDataclassParamName.infer÷  s1   € Ø×ÑÑ'ÜÐà×&Ñ&×1Ñ1°$×2FÑ2FÓGÐGr9   )rŽ   r�   )
rM   rN   rO   rP   Ú__doc__r.   r.  rC   rQ   rR   rS   s   @r7   r•   r•   ê  s   ø† ñõ)ò
/÷Hð Hr9   r•   c                  ó6   ^ • \ rS rSrSrU 4S jrSS jrSrU =r$ )ræ   iþ  zb
It represents the ``__init__`` signature of a class with dataclass semantics.

.. code:: python

c                ó0   >• [         TU ]  U5        X l        g r,   )r-   r.   Ú_param_names)r1   rn   r—   r6   s      €r7   r.   ÚDataclassSignature.__init__  s   ø€ Ü‰Ñ˜ÔØ'Õr9   c                ó   • U R                   $ r,   ©r6  )r1   Úresolve_starss     r7   Úget_param_namesÚ"DataclassSignature.get_param_names	  s   € Ø× Ñ Ð r9   r9  )F)	rM   rN   rO   rP   r3  r.   r;  rQ   rR   rS   s   @r7   ræ   ræ   þ  s   ø† ñõ(÷!ò !r9   ræ   c                  ó>   ^ • \ rS rSrSrSSU 4S jjjrSS jrSrU =r$ )	ÚDataclassDecoratori  zù
A dataclass(-like) decorator with custom parameters.

.. code:: python

    @dataclass(init=True) # this
    class A: ...

    @dataclass_transform
    def create_model(*, init=False): pass

    @create_model(init=False) # or this
    class B: ...
c                ój   >• [         TU ]  U5        U R                  U5      nUb  UU l        gUU l        g)z©
Args:
    function: Decoratee | function
    arguments: The parameters to the dataclass function decorator
    default_init: Boolean to indicate the default init value
N)r-   r.   Ú_init_param_valuerä   )r1   rF   rµ   Údefault_initÚargument_initr6   s        €r7   r.   ÚDataclassDecorator.__init__  s=   ø€ ô 	‰Ñ˜Ô"Ø×.Ñ.¨yÓ9ˆà*Ñ6ˆMð 	ÕØ<Hð 	Õr9   c                ó¶   • UR                   (       d  g UR                   R                  S:X  a  UR                   R                  OUR                   /n[        U5      $ )NÚarglist)Úargument_noder|   r}   r€   )r1   rµ   r~   s      r7   r@  Ú$DataclassDecorator._init_param_value*  sS   € Ø×&×&Øð ×&Ñ&×+Ñ+¨yÓ8ð ×#Ñ#×,Ò,à×)Ñ)Ð*ð 	ô   	Ó*Ð*r9   )rä   r  )rA  Úbool©r  zOptional[bool])	rM   rN   rO   rP   r3  r.   r@  rQ   rR   rS   s   @r7   r>  r>    s   ø† ñ÷
ñ 
÷
+ò 
+r9   r>  c                  óJ   ^ • \ rS rSrSrU 4S jrSS jr\SS j5       rSr	U =r
$ )	rÚ   i7  a7  
A class decorated with the ``dataclass_transform`` decorator. dataclass-like
semantics will be assumed for any class that directly or indirectly derives
from the decorated class or uses the decorated class as a metaclass.
Attributes on the decorated class and its base classes are not considered to
be fields.
c                ó$   >• [         TU ]  U5        g r,   )r-   r.   )r1   Úwrapped_valuer6   s     €r7   r.   ÚDataclassTransformer.__init__?  s   ø€ Ü‰Ñ˜Õ'r9   c                ó†  • U R                   R                  S5      nU(       d  g[        U5      S   nUR                  5        H|  nUR                  S:X  d  M  UR
                  (       d  M(  UR
                  R                  S:X  d  MD  UR
                  R                  S:X  a    gUR
                  R                  S:X  d  M|    g   g)	z$Default value if missing is ``True``r#  Tr   rx   Úkeywordrz   Fr{   )rÙ   r$  rá   r;  r¿   r�   r|   rn   )r1   Únew_methodsÚ
new_methodÚparams       r7   rÛ   Ú'DataclassTransformer.init_mode_from_newB  s¡   € à×)Ñ)×<Ñ<¸YÓGˆæØä˜+Ó& qÑ)ˆ
à×/Ñ/Ö1ˆEà×!Ñ! VÕ+Ø×&×&Ñ&Ø×&Ñ&×+Ñ+¨yÕ8à×%Ñ%×+Ñ+¨wÓ6Ù Ø×'Ñ'×-Ñ-°Õ7Ùñ 2ð r9   c                ó   • gr¦   r§   r¨   s    r7   râ   Ú1DataclassTransformer.init_mode_from_init_subclassX  s   € ð r9   r§   )r  rH  rI  )rM   rN   rO   rP   r3  r.   rÛ   rG   râ   rQ   rR   rS   s   @r7   rÚ   rÚ   7  s&   ø† ñõ(ôð, óó ör9   rÚ   c                  ó:   ^ • \ rS rSrSr  SU 4S jjrS rSrU =r$ )ÚDataclassWrapperi_  aQ  
A class with dataclass semantics from a decorator. The init parameters are
only from the current class and parent classes decorated where the ``init``
parameter was ``True``.

.. code:: python

    @dataclass
    class A: ... # this

    @dataclass_transform
    def create_model(): pass

    @create_model()
    class B: ... # or this
c                ó0   >• [         TU ]  U5        X l        g r,   )r-   r.   Úshould_generate_init)r1   rL  rY  r6   s      €r7   r.   ÚDataclassWrapper.__init__q  s   ø€ ô 	‰Ñ˜Ô'Ø$8Õ!r9   c                óú   • / n[        [        U R                  5       5      5       HG  n[        U[        5      (       d  M  UR
                  (       d  M-  UR                  [        U5      5        MI     [        WU5      /$ r,   )	rà   rá   rÃ   rØ   rW  rY  rå   r›   ræ   )r1   r—   r–   s      r7   rí   ÚDataclassWrapper.get_signaturesw  sb   € ØˆÜœD §¡Ó!1Ó2Ö3ˆCä˜3Ô 0×1Ó1Ø×,×,Ñ,à×"Ñ"Ô#<¸SÓ#AÖBñ 4ô # 3¨Ó4Ð5Ð5r9   )rY  )rY  rH  )	rM   rN   rO   rP   r3  r.   rí   rQ   rR   rS   s   @r7   rW  rW  _  s   ø† ñð"9Ø37÷9÷6ð 6r9   rW  c                  óÎ   • \ rS rSrSr\" 5       S 5       rS r\" SS9S 5       r\	R                  " 5       S 5       r\" \S9S	 5       rSS
 jr\	R                  " 5       S 5       rSrg)rã   i‚  Úclassc                óò   • / nU R                   R                  5       nUc  / $ [        U5       HF  u  p4U(       a  M  SSKJn  U" U R
                  U5       H  nXa;  d  M
  UR                  U5        M     MH     U$ )Nr   )Úfind_unknown_type_vars)rŸ   Úget_super_arglistr   Ú!jedi.inference.gradual.annotationr`  r>   r”   )r1   ÚfoundrE  Ústarsri   r`  r  s          r7   r¤   ÚClassValue.list_type_vars…  sn   € àˆØ—.‘.×2Ñ2Ó4ˆØ‰?ØˆIä)¨'Ö2‰KˆEÞÙåPÙ2°4×3FÑ3FÈÖM�ØÕ(à—L‘L Ö*ó Nñ 3ð ˆr9   c                ó    • U R                   R                  5       nU(       a-  SSKJn  UR	                  U R
                  U R                  U5      $ g )Nr   )rµ   )rŸ   ra  Újedi.inferencerµ   ÚTreeArgumentsr?   r>   )r1   rE  rµ   s      r7   Ú_get_bases_argumentsÚClassValue._get_bases_arguments—  s?   € Ø—.‘.×2Ñ2Ó4ˆÞÝ0Ø×*Ñ*¨4×+?Ñ+?À×ATÑATÐV]Ó^Ð^Ør9   r§   rû   c                ó`  • U R                  5       nUb2  UR                  5        VVs/ s H  u  p#Ub  M
  UPM     nnnU(       a  U$ U R                  5       S:X  a!  U R                  R	                  5       (       a  / $ [        U R                  R                  R                  S5      5      /$ s  snnf )Nr"  )	ri  ÚunpackrÀ   r>   r(  r   r?   Úbuiltins_moduler$  )r1   rÓ   r†   rn   Úlsts        r7   r    ÚClassValue.py__bases__ž  s—   € à×(Ñ(Ó*ˆØÑØ+/¯;©;¬=ÔHª=™Z˜S¸C—5©=ˆCÑHÞØ�
à�?‰?Ó Ó(Ø×'Ñ'×:Ñ:×<Ñ<ØˆIÜØ× Ñ ×0Ñ0×CÑCÀHÓMó
ð ð 	ùó Is
   §	B*´B*c                ó4   • [         R                  " SU5        / $ )NzUnprocessed metaclass %s)r	   rÅ   )r1   rÒ   r]   s      r7   r¢   Ú ClassValue.get_metaclass_filters­  s   € ä�ŠÐ0°+Ô>Øˆ	r9   c                óÌ  • U R                  5       nUbd  UR                  5        VVs/ s H  u  p#US:X  d  M  UPM     nnn[        R                  " S U 5       5      n[        S U 5       5      nU(       a  U$ U R	                  5        HN  nUR                  5        H7  nUR                  5       (       d  M  UR                  5       nU(       d  M3  Us  s  $    MP     [        $ s  snnf )NÚ	metaclassc              3  ó@   #   • U  H  oR                  5       v •  M     g 7fr,   )rC   )r  Ú
lazy_values     r7   r
  Ú-ClassValue.get_metaclasses.<locals>.<genexpr>·  s   é € Ð,TÒRSÀJ×-=Ñ-=×-?Ð-?ÒRSùs   ‚c              3  óR   #   • U  H  oR                  5       (       d  M  Uv •  M     g 7fr,   )r©   )r  Úms     r7   r
  rv  ¸  s   é € Ð"Jªk¨¿Z¹Z¿\§1¡1ªkùs   ‚'ž	')	ri  rl  r   Ú	from_setsr    rC   r©   r¡   r   )r1   rÓ   r†   rn   rx  rÒ   Ú	lazy_baser’   s           r7   r¡   ÚClassValue.get_metaclasses²  sÀ   € à×(Ñ(Ó*ˆØÑØ)-¯©¬ÔMª™:˜3¸#ÀÑ:L—©ˆAÑMÜ"×,Ò,Ñ,TÑRSÓ,TÓTˆKÜ"Ñ"J©kÓ"JÓJˆKÞØ"Ð"à×)Ñ)Ö+ˆIØ"Ÿ™Ö*�Ø—>‘>×#Ó#Ø"×2Ñ2Ó4�Fß�vØ%œó	 +ñ ,ô Ðùó Ns
   §C ·C c                óž   • U R                  5       nUc  gUR                  R                  S:w  a  g[        UR                  R                  5      $ )zA
It returns ``True`` if ``class X(init=False):`` else ``False``.
NrE  )ri  rF  r|   r€   r}   )r1   Úbases_argumentss     r7   rä   ÚClassValue.init_param_modeÄ  sK   € ð ×3Ñ3Ó5ˆàÑ"Øà×(Ñ(×-Ñ-°Ó:ð ä × =Ñ =× FÑ FÓGÐGr9   c                ó   • / $ r,   r§   )r1   rÒ   s     r7   r£   Ú#ClassValue.get_metaclass_signaturesÔ  s   € àˆ	r9   NrI  )rM   rN   rO   rP   rH   r   r¤   ri  r    r#   Údecorater¢   r   r¡   rä   r£   rQ   r§   r9   r7   rã   rã   ‚  s“   † Ø€Há!Ó#ñó $ðò"ñ "¨"Ñ-ñó .ðð ×ÒÓñó ðñ "¨)Ñ4ñó 5ðô"Hð  ×ÒÓñó ór9   rã   )rs  NrI  )r  zList[DataclassParamName])Cr3  Ú
__future__r   Útypingr   r   r   r   r   Újedir	   Újedi.parser_utilsr
   r   r   Újedi.inference.cacher   r   r   rg  r   Újedi.inference.lazy_valuer   r   Újedi.inference.filtersr   Újedi.inference.namesr   r   Újedi.inference.argumentsr   r   Újedi.inference.base_valuer   r   r   r   Újedi.inference.contextr   Újedi.inference.value.functionr   r   Újedi.inference.value.decoratorr    Újedi.inference.gradual.genericsr!   r"   Újedi.pluginsr#   Úinspectr$   r%   Újedi.inference.signaturer&   r'   r)   rU   r€   r›   r�   rì   r•   ræ   r>  rÚ   rW  rã   r§   r9   r7   Ú<module>r“     sû   ðñ%õL #ç <Õ <å ÷ñ ÷+ñ +å #ß DÝ 3ß >ß D÷ó å /ß MÝ 4ß SÝ 'Ý Ý 2Ý 6æÝ-ô!Ð"ô !ôH$GÐ"ô $GôNô*#÷LL ñ L ò^ô"HÐ*ô Hô(!Ð*ô !ô'+˜ }ô '+ôT%˜<¨ô %ôP 6�| Zô  6ôFT�Ð1¸_ó Tr9   