ó
    Ð]j¯U  ã                  ó‚  • % S SK Jr  S SKrS SKrS SKJrJr  S SK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  S S	KJr  \(       a4  S SKrS S
KJr  S SKJr  S SKJr  S SKJr  S SKJr  S SK J!r!J"r"J#r#J$r$J%r%J&r&J'r'   " S S5      r(\)\*\)\4   -  \(-  \+\(   -  r,  " S S5      r-SS1r.S\/S'    SS jr0    SS jr1SS jr2g)é    )ÚannotationsN)Úmodule_from_specÚspec_from_file_location)Úisclass)ÚPath)ÚTYPE_CHECKINGÚAny)Úast_childrenÚast_kind)ÚExtensionNotLoadedError)Údynamic_import)Ú
ModuleType)Ú	Inspector)Ú
ObjectNode)ÚVisitor)ÚGriffeLoader)ÚAliasÚ	AttributeÚClassÚFunctionÚModuleÚObjectÚ	TypeAliasc                  óä  • \ rS rSrSrS!S jrS!S jrS"S jrS"S jrS#S jr	          S$S jr
S%S	 jrS$S
 jrS#S jr          S&S jrS'S jr          S&S jrS#S jr          S(S jrS)S jr          S(S jrS#S jr          S*S jrS+S jrS#S jr          S,S jrS-S jrS#S jr          S.S jrS/S jr          S0S jrS1S jrS2S jr Sr!g )3Ú	Extensioné   z!Base class for Griffe extensions.c                óD   • [        U S[        U5       3S 5      " U5        g)z8Visit a node.

Parameters:
    node: The node to visit.
Úvisit_c                ó   • g ©N© ©Ú_s    Ú]/home/mande/repo/quber/.venv/lib/python3.13/site-packages/griffe/_internal/extensions/base.pyÚ<lambda>Ú!Extension.visit.<locals>.<lambda>%   s   € ¸4ó    N)Úgetattrr   ©ÚselfÚnodes     r$   ÚvisitÚExtension.visit   s!   € ô 	�˜œx¨›~Ð.Ð/±Ô@ÀÕFr'   c                óJ   • [        U5       H  nU R                  U5        M     g)zPVisit children nodes.

Parameters:
    node: The node to visit the children of.
N)r
   r,   ©r*   r+   Úchilds      r$   Úgeneric_visitÚExtension.generic_visit'   s   € ô " $Ö'ˆEØ�J‰J�uÖò (r'   c                óF   • [        U SUR                   3S 5      " U5        g)z<Inspect a node.

Parameters:
    node: The node to inspect.
Úinspect_c                ó   • g r    r!   r"   s    r$   r%   Ú#Extension.inspect.<locals>.<lambda>6   s   € ¸r'   N)r(   Úkindr)   s     r$   ÚinspectÚExtension.inspect0   s    € ô 	�˜ §¡ Ð,©nÔ=¸dÕCr'   c                ór   • UR                    H'  nUR                  (       a  M  U R                  U5        M)     g)z`Extend the base generic inspection with extensions.

Parameters:
    node: The node to inspect.
N)ÚchildrenÚalias_target_pathr8   r/   s      r$   Úgeneric_inspectÚExtension.generic_inspect8   s*   € ð —]”]ˆEØ×*×*Ñ*Ø—‘˜UÖ#ò #r'   c               ó   • g)zpRun when visiting a new node during static/dynamic analysis.

Parameters:
    node: The currently visited node.
Nr!   ©r*   r+   ÚagentÚkwargss       r$   Úon_nodeÚExtension.on_nodeB   ó   � r'   c               ó   • g)a¨  Run when an Object has been created.

Warning:
    This method runs while the object tree is still being constructed:
    data might be incomplete (class inheritance, alias resolution, etc.).
    Only hook onto this event if you know what you're doing.

Parameters:
    node: The currently visited node.
    obj: The object instance.
    agent: The analysis agent currently running.
    **kwargs: For forward-compatibility.
Nr!   ©r*   r+   ÚobjrA   rB   s        r$   Úon_instanceÚExtension.on_instanceI   rE   r'   c               ó   • g)a_  Run on objects (every kind) once the object tree has been fully constructed.

Note:
    This method runs once the object tree has been fully constructed:
    data is therefore complete and you can safely hook onto this event.

Parameters:
    obj: The object instance.
    loader: The loader currently in use.
    **kwargs: For forward-compatibility.
Nr!   )r*   rH   ÚloaderrB   s       r$   Ú	on_objectÚExtension.on_object_   rE   r'   c               ó   • g)a³  Run when members of an Object have been loaded.

Warning:
    This method runs while the object tree is still being constructed:
    data might be incomplete (class inheritance, alias resolution, etc.).
    Only hook onto this event if you know what you're doing.

Parameters:
    node: The currently visited node.
    obj: The object instance.
    agent: The analysis agent currently running.
    **kwargs: For forward-compatibility.
Nr!   rG   s        r$   Ú
on_membersÚExtension.on_membersl   rE   r'   c               ó   • g)zÑRun when visiting a new module node during static/dynamic analysis.

Parameters:
    node: The currently visited node.
    agent: The analysis agent currently running.
    **kwargs: For forward-compatibility.
Nr!   r@   s       r$   Úon_module_nodeÚExtension.on_module_node{   rE   r'   c               ó   • g)a§  Run when a Module has been created.

Warning:
    This method runs while the object tree is still being constructed:
    data might be incomplete (class inheritance, alias resolution, etc.).
    Only hook onto this event if you know what you're doing.

Parameters:
    node: The currently visited node.
    mod: The module instance.
    agent: The analysis agent currently running.
    **kwargs: For forward-compatibility.
Nr!   ©r*   r+   ÚmodrA   rB   s        r$   Úon_module_instanceÚExtension.on_module_instance„   rE   r'   c               ó   • g)aR  Run on modules once the object tree has been fully constructed.

Note:
    This method runs once the object tree has been fully constructed:
    data is therefore complete and you can safely hook onto this event.

Parameters:
    mod: The module instance.
    loader: The loader currently in use.
    **kwargs: For forward-compatibility.
Nr!   )r*   rW   rL   rB   s       r$   Ú	on_moduleÚExtension.on_moduleš   rE   r'   c               ó   • g)a²  Run when members of a Module have been loaded.

Warning:
    This method runs while the object tree is still being constructed:
    data might be incomplete (class inheritance, alias resolution, etc.).
    Only hook onto this event if you know what you're doing.

Parameters:
    node: The currently visited node.
    mod: The module instance.
    agent: The analysis agent currently running.
    **kwargs: For forward-compatibility.
Nr!   rV   s        r$   Úon_module_membersÚExtension.on_module_members§   rE   r'   c               ó   • g)zÐRun when visiting a new class node during static/dynamic analysis.

Parameters:
    node: The currently visited node.
    agent: The analysis agent currently running.
    **kwargs: For forward-compatibility.
Nr!   r@   s       r$   Úon_class_nodeÚExtension.on_class_node½   rE   r'   c               ó   • g)a¥  Run when a Class has been created.

Warning:
    This method runs while the object tree is still being constructed:
    data might be incomplete (class inheritance, alias resolution, etc.).
    Only hook onto this event if you know what you're doing.

Parameters:
    node: The currently visited node.
    cls: The class instance.
    agent: The analysis agent currently running.
    **kwargs: For forward-compatibility.
Nr!   ©r*   r+   ÚclsrA   rB   s        r$   Úon_class_instanceÚExtension.on_class_instanceÆ   rE   r'   c               ó   • g)aQ  Run on classes once the object tree has been fully constructed.

Note:
    This method runs once the object tree has been fully constructed:
    data is therefore complete and you can safely hook onto this event.

Parameters:
    cls: The class instance.
    loader: The loader currently in use.
    **kwargs: For forward-compatibility.
Nr!   )r*   re   rL   rB   s       r$   Úon_classÚExtension.on_classÜ   rE   r'   c               ó   • g)a°  Run when members of a Class have been loaded.

Warning:
    This method runs while the object tree is still being constructed:
    data might be incomplete (class inheritance, alias resolution, etc.).
    Only hook onto this event if you know what you're doing.

Parameters:
    node: The currently visited node.
    cls: The class instance.
    agent: The analysis agent currently running.
    **kwargs: For forward-compatibility.
Nr!   rd   s        r$   Úon_class_membersÚExtension.on_class_membersé   rE   r'   c               ó   • g)zÓRun when visiting a new function node during static/dynamic analysis.

Parameters:
    node: The currently visited node.
    agent: The analysis agent currently running.
    **kwargs: For forward-compatibility.
Nr!   r@   s       r$   Úon_function_nodeÚExtension.on_function_nodeÿ   rE   r'   c               ó   • g)a¬  Run when a Function has been created.

Warning:
    This method runs while the object tree is still being constructed:
    data might be incomplete (class inheritance, alias resolution, etc.).
    Only hook onto this event if you know what you're doing.

Parameters:
    node: The currently visited node.
    func: The function instance.
    agent: The analysis agent currently running.
    **kwargs: For forward-compatibility.
Nr!   )r*   r+   ÚfuncrA   rB   s        r$   Úon_function_instanceÚExtension.on_function_instance  rE   r'   c               ó   • g)aW  Run on functions once the object tree has been fully constructed.

Note:
    This method runs once the object tree has been fully constructed:
    data is therefore complete and you can safely hook onto this event.

Parameters:
    func: The function instance.
    loader: The loader currently in use.
    **kwargs: For forward-compatibility.
Nr!   )r*   rr   rL   rB   s       r$   Úon_functionÚExtension.on_function  rE   r'   c               ó   • g)zÔRun when visiting a new attribute node during static/dynamic analysis.

Parameters:
    node: The currently visited node.
    agent: The analysis agent currently running.
    **kwargs: For forward-compatibility.
Nr!   r@   s       r$   Úon_attribute_nodeÚExtension.on_attribute_node+  rE   r'   c               ó   • g)a¯  Run when an Attribute has been created.

Warning:
    This method runs while the object tree is still being constructed:
    data might be incomplete (class inheritance, alias resolution, etc.).
    Only hook onto this event if you know what you're doing.

Parameters:
    node: The currently visited node.
    attr: The attribute instance.
    agent: The analysis agent currently running.
    **kwargs: For forward-compatibility.
Nr!   )r*   r+   ÚattrrA   rB   s        r$   Úon_attribute_instanceÚExtension.on_attribute_instance4  rE   r'   c               ó   • g)aY  Run on attributes once the object tree has been fully constructed.

Note:
    This method runs once the object tree has been fully constructed:
    data is therefore complete and you can safely hook onto this event.

Parameters:
    attr: The attribute instance.
    loader: The loader currently in use.
    **kwargs: For forward-compatibility.
Nr!   )r*   r|   rL   rB   s       r$   Úon_attributeÚExtension.on_attributeJ  rE   r'   c               ó   • g)zÕRun when visiting a new type alias node during static/dynamic analysis.

Parameters:
    node: The currently visited node.
    agent: The analysis agent currently running.
    **kwargs: For forward-compatibility.
Nr!   r@   s       r$   Úon_type_alias_nodeÚExtension.on_type_alias_nodeW  rE   r'   c               ó   • g)aµ  Run when a TypeAlias has been created.

Warning:
    This method runs while the object tree is still being constructed:
    data might be incomplete (class inheritance, alias resolution, etc.).
    Only hook onto this event if you know what you're doing.

Parameters:
    node: The currently visited node.
    type_alias: The type alias instance.
    agent: The analysis agent currently running.
    **kwargs: For forward-compatibility.
Nr!   )r*   r+   Ú
type_aliasrA   rB   s        r$   Úon_type_alias_instanceÚ Extension.on_type_alias_instance`  rE   r'   c               ó   • g)ab  Run on type aliases once the object tree has been fully constructed.

Note:
    This method runs once the object tree has been fully constructed:
    data is therefore complete and you can safely hook onto this event.

Parameters:
    type_alias: The type alias instance.
    loader: The loader currently in use.
    **kwargs: For forward-compatibility.
Nr!   )r*   r†   rL   rB   s       r$   Úon_type_aliasÚExtension.on_type_aliasv  rE   r'   c               óT   • [        U SS5      (       a  U R                  " SXUS.UD6  gg)a¨  Run when an Alias has been created.

Warning:
    This method runs while the object tree is still being constructed:
    data might be incomplete (class inheritance, alias resolution, etc.).
    Only hook onto this event if you know what you're doing.

Parameters:
    node: The currently visited node.
    alias: The alias instance.
    agent: The analysis agent currently running.
    **kwargs: For forward-compatibility.
Ú__old_on_aliasF)r+   ÚaliasrA   Nr!   )r(   Úon_alias)r*   r+   rŽ   rA   rB   s        r$   Úon_alias_instanceÚExtension.on_alias_instanceƒ  s/   € ô* �4Ð)¨5×1Ñ1Ø�MŠMÐH˜t¸ÑHÀÓHð 2r'   c               ó   • g)aS  Run on aliases once the object tree has been fully constructed.

Note:
    This method runs once the object tree has been fully constructed:
    data is therefore complete and you can safely hook onto this event.

Parameters:
    alias: The alias instance.
    loader: The loader currently in use.
    **kwargs: For forward-compatibility.
Nr!   )r*   rŽ   rL   rB   s       r$   r�   ÚExtension.on_alias›  rE   r'   c               ó   • g)aK  Run when a package has been completely loaded.

Note:
    This method runs once the object tree has been fully constructed:
    data is therefore complete and you can safely hook onto this event.

Parameters:
    pkg: The package (Module) instance.
    loader: The loader currently in use.
    **kwargs: For forward-compatibility.
Nr!   )r*   ÚpkgrL   rB   s       r$   Ú
on_packageÚExtension.on_package¨  rE   r'   r!   N)r+   zast.ASTÚreturnÚNone)r+   r   r˜   r™   )r+   úast.AST | ObjectNoderA   úVisitor | InspectorrB   r	   r˜   r™   )
r+   rš   rH   r   rA   r›   rB   r	   r˜   r™   )rH   r   rL   r   rB   r	   r˜   r™   )
r+   rš   rW   r   rA   r›   rB   r	   r˜   r™   )rW   r   rL   r   rB   r	   r˜   r™   )
r+   rš   re   r   rA   r›   rB   r	   r˜   r™   )re   r   rL   r   rB   r	   r˜   r™   )
r+   rš   rr   r   rA   r›   rB   r	   r˜   r™   )rr   r   rL   r   rB   r	   r˜   r™   )
r+   rš   r|   r   rA   r›   rB   r	   r˜   r™   )r|   r   rL   r   rB   r	   r˜   r™   )
r+   rš   r†   r   rA   r›   rB   r	   r˜   r™   )r†   r   rL   r   rB   r	   r˜   r™   )
r+   rš   rŽ   r   rA   r›   rB   r	   r˜   r™   )rŽ   r   rL   r   rB   r	   r˜   r™   )r•   r   rL   r   rB   r	   r˜   r™   )"Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r,   r1   r8   r=   rC   rI   rM   rP   rS   rX   r[   r^   ra   rf   ri   rl   ro   rs   rv   ry   r}   r€   rƒ   r‡   rŠ   r�   r�   r–   Ú__static_attributes__r!   r'   r$   r   r      s[  † Ù+ôGôôDô$ôðð #ðð ð	ð
 #ðð ðð 
ôô,ôôðð #ðð ð	ð
 #ðð ðð 
ôô,ðð #ðð ð	ð
 #ðð ðð 
ôô,ðð #ðð ð	ð
 #ðð ðð 
ôô,ðð #ðð ð	ð
 #ðð ðð 
ôô,ðð #ðð ð	ð
 #ðð ðð 
ôô,ôðð #ðð ð	ð
 #ðð ðð 
ôô,ôðð #ðð ð	ð
 #ðð ðð 
ôô,ðIð #ðIð ð	Ið
 #ðIð ðIð 
ôIô0÷r'   r   c                  ó@   • \ rS rSrSrS	S jrS	S jrS
S jrSS jrSr	g)Ú
Extensionsiº  zLThis class helps iterating on extensions that should run at different times.c                ó0   • / U l         U R                  " U6   g)zZInitialize the extensions container.

Parameters:
    *extensions: The extensions to add.
N)Ú_extensionsÚadd)r*   Ú
extensionss     r$   Ú__init__ÚExtensions.__init__½  s   € ð -/ˆÔØ�Š�*Òr'   c                óL   • U H  nU R                   R                  U5        M      g)zWAdd extensions to this container.

Parameters:
    *extensions: The extensions to add.
N)r¥   Úappend)r*   r§   Ú	extensions      r$   r¦   ÚExtensions.addÆ  s"   € ó $ˆIØ×Ñ×#Ñ# IÖ.ò $r'   c                ó   • g)z!No-op method for extension hooks.Nr!   )r*   rB   s     r$   Ú_noopÚExtensions._noopÏ  rE   r'   c                ób   • U R                    H  n[        X1U R                  5      " S0 UD6  M!     g)z†Call the extension hook for the given event.

Parameters:
    event: The triggered event.
    **kwargs: Arguments passed to the hook.
Nr!   )r¥   r(   r¯   )r*   ÚeventrB   r¬   s       r$   ÚcallÚExtensions.callÒ  s*   € ð ×)Ô)ˆIÜ�I d§j¡jÔ1Ñ;°FÔ;ò *r'   )r¥   N)r§   r   r˜   r™   )rB   r	   r˜   r™   )r²   ÚstrrB   r	   r˜   r™   )
rœ   r�   rž   rŸ   r    r¨   r¦   r¯   r³   r¡   r!   r'   r$   r£   r£   º  s   † ÙVôô/ô0÷<r'   r£   ÚdataclassesÚunpack_typeddictzset[str]Úbuiltin_extensionsc                ó  • [         R                  R                  U 5      R                  SS5      S   n[	        X5      nU(       d  [        SU  S35      e[        U5      nU[        R                  U'   UR                  R                  U5        U$ )NÚ.é   r   z#Could not import module from path 'Ú')ÚosÚpathÚbasenameÚrsplitr   r   r   ÚsysÚmodulesrL   Úexec_module)r¾   Úmodule_nameÚspecÚmodules       r$   Ú_load_extension_pathrÇ   ä  sz   € Ü—'‘'×"Ñ" 4Ó(×/Ñ/°°QÓ7¸Ñ:€KÜ" ;Ó5€DÞÜ%Ð(KÈDÈ6ÐQRÐ&SÓTÐTÜ˜dÓ#€FØ%„C‡K�K�ÑØ‡K�K×Ñ˜FÔ#Ø€Mr'   c                ó  • Sn[        U [        5      (       a  U $ [        U 5      (       a  [        U [        5      (       a  U " 5       $ [        U [        5      (       a0  [        [        U R                  5       5      5      u  p#[        U5      nO[        U 5      n0 nUR                  S5      nUS:”  d   U(       a.  S[        U5      R                  ;  a  UR                  SS5      u  p%OSnU[        ;   a  SU 3nO0[        R                  R!                  U5      (       a   [#        U5      nU(       d   [)        U5      n[        U5      (       a  [        U[        5      (       a  U" S0 UD6$ U(       a   [-        X5      " S0 UD6$ [1        U5      R3                  5        Vs/ s H9  n[        U5      (       d  M  [        U[        5      (       d  M,  U[        Ld  M7  UPM;     nnU V	s/ s H
  o™" S0 UD6PM     sn	$ ! [$         a  n['        SU S35      UeSnAff = f! [*         a  n['        SU S35      UeSnAf[$         a  n['        SU SU 35      UeSnAff = f! [.         a  n['        SU S	U S
35      UeSnAff = fs  snf s  sn	f )a�  Load a configured extension.

Parameters:
    extension: An extension, with potential configuration options.

Raises:
    ExtensionNotLoadedError: When the extension cannot be loaded,
        either because the module is not found, or because it does not expose
        the Extension attribute. ImportError will bubble up so users can see
        the traceback.

Returns:
    An extension instance.
NÚ:r»   zgriffe._internal.extensions.zExtension module 'z' could not be foundz!Error while importing extension 'z': z
' has no 'z' attributer!   )Ú
isinstancer   r   Ú
issubclassÚdictÚnextÚiterÚitemsrµ   Úcountr   ÚdriverÀ   r¸   r½   r¾   ÚexistsrÇ   ÚImportErrorr   r   ÚModuleNotFoundErrorr(   ÚAttributeErrorÚvarsÚvalues)
r¬   Ú
ext_objectÚimport_pathÚoptionsÚcolonsÚextension_nameÚerrorrH   r§   Úexts
             r$   Ú_load_extensionrß   ï  s‡  € ð" €Jô �)œY×'Ñ'ØÐô ˆy×Ñœj¨´I×>Ñ>Ù‹{Ðô �)œT×"Ñ"Ü#¤D¨¯©Ó):Ó$;Ó<Ñˆô ˜+Ó&‰ô ˜)“nˆØˆð ×Ñ˜sÓ#€Fà�ƒz–f ¬D°Ó,=×,CÑ,CÓ!CØ&1×&8Ñ&8¸¸aÓ&@Ñ#ˆ�^àˆð Ô(Ó(Ø4°[°MÐB‰ä	�‰�‰˜×	$Ñ	$ð	mÜ-¨kÓ:ˆJö ð	rÜ'¨Ó4ˆJô ˆz×Ñœz¨*´i×@Ñ@ÙÑ$˜GÑ$Ð$ö ð	Ü˜:Ô6ÑA¸ÑAÐAô ˜JÓ'×.Ñ.Ô0óÚ0�´G¸C·L‹ÄZÐPSÔU^×E_‹ÐdgÔoxÐdx�Ñ0ð ð ñ '1Ó1¢j˜sˆC‰N�'ŒN¡jÑ1Ð1øôA ó 	mÜ)Ð,>¸{¸mÐK_Ð*`ÓaÐglÐlûð	mûô #ó 	mÜ)Ð,>¸{¸mÐK_Ð*`ÓaÐglÐlûÜó 	rÜ)Ð,MÈkÈ]ÐZ]Ð^cÐ]dÐ*eÓfÐlqÐqûð	rûô ó 	Ü)Ø$ [ M°¸NÐ;KÈ;ÐWóàðûð	üòùò 2sr   ÄG4 Ä.H Å.I ÆI<Æ2I<Ç	I<ÇI<Ç JÇ4
HÇ>HÈHÈ
IÈ H0È0IÈ=IÉIÉ
I9É!I4É4I9c                 ó4  • [        5       nU  HE  n[        U5      n[        U[        5      (       a  UR                  " U6   M4  UR	                  U5        MG     SSKJn  UR                   H  n[        U5      UL d  M    U$    UR                  " [        S5      6   U$ )z‹Load configured extensions.

Parameters:
    exts: Extensions with potential configuration options.

Returns:
    An extensions container.
r   )ÚDataclassesExtensionr¶   )	r£   rß   rÊ   Úlistr¦   Ú'griffe._internal.extensions.dataclassesrá   r¥   Útype)Úextsr§   r¬   rÞ   rá   s        r$   Úload_extensionsræ   J  s‹   € ô “€Jãˆ	Ü˜iÓ(ˆÜ�cœ4× Ñ Ø�NŠN˜CÓ à�N‰N˜3Öñ õ Mà×%Ô%ˆÜ�‹9Ð,Ô,Øð Ðñ &ð 	�Šœ¨Ó6Ñ7àÐr'   )r¾   rµ   r˜   r   )r¬   z2str | dict[str, Any] | Extension | type[Extension]r˜   zExtension | list[Extension])rå   ÚLoadableExtensionTyper˜   r£   )3Ú
__future__r   r½   rÁ   Úimportlib.utilr   r   r8   r   Úpathlibr   Útypingr   r	   Ú!griffe._internal.agents.nodes.astr
   r   Úgriffe._internal.exceptionsr   Úgriffe._internal.importerr   ÚastÚtypesr   Ú!griffe._internal.agents.inspectorr   Ú%griffe._internal.agents.nodes.runtimer   Úgriffe._internal.agents.visitorr   Úgriffe._internal.loaderr   Úgriffe._internal.modelsr   r   r   r   r   r   r   r   rµ   rÌ   rä   rç   r£   r¸   Ú__annotations__rÇ   rß   ræ   r!   r'   r$   Ú<module>r÷      sÀ   ðö #ã 	Û 
ß DÝ Ý ß %ç DÝ ?Ý 4æÛÝ å;Ý@Ý7Ý4ßd×dÑd÷Wñ Wðt ˜d 3¨ 8™nÑ,¨yÑ8¸4À	¹?ÑJÐ Ø <÷ <ñ  <ðH Øð Ð �Hó ð /ôðX2ØAðX2à ôX2õvr'   