ó
    Ð]jaA  ã                  ó,  • S SK Jr  S SKr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  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  \(       a$  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&  Sr'\ " S S5      5       r(\SS.S)S jj5       r)\ S*SSS.         S+S jjj5       r*\ S*SSSSSSSSSSSSSS.                               S,S jjj5       r+\ S*SSSSSSSSSSSSSS.                               S,S jjj5       r,\SSSSSSSS .                 S-S! jj5       r-\SSSSSSSSS".                   S.S# jj5       r.SS$.S/S% jjr/S0S& jr0SSS'.S1S( jjr1g)2é    )ÚannotationsN)Úcontextmanager)Ú	dataclass)Úinvalidate_caches)ÚPath)Údedent)ÚTYPE_CHECKING)Úinspect)Úvisit)ÚLinesCollection)Úload)ÚModuleÚObject)ÚIteratorÚMappingÚSequence)ÚModulesCollection)ÚDocstringOptionsÚDocstringStyle)ÚParser)Ú
ExtensionsÚgriffe_c                  óH   • \ rS rSr% SrS\S'    S\S'    S\S'    SS jrS	rg
)Ú
TmpPackageé!   z—A temporary package.

The `tmpdir` and `path` parameters can be passed as relative path.
They will be resolved to absolute paths after initialization.
r   ÚtmpdirÚstrÚnameÚpathc                ó€   • U R                   R                  5       U l         U R                  R                  5       U l        g ©N)r   Úresolver   )Úselfs    ÚS/home/mande/repo/quber/.venv/lib/python3.13/site-packages/griffe/_internal/tests.pyÚ__post_init__ÚTmpPackage.__post_init__0   s*   € Ø—k‘k×)Ñ)Ó+ˆŒØ—I‘I×%Ñ%Ó'ˆ�	ó    )r   r   N)ÚreturnÚNone)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__annotations__r%   Ú__static_attributes__© r'   r$   r   r   !   s&   ‡ ñð ƒLØ9Ø
ƒIØ8Ø
ƒJØ÷(r'   r   Úmodule©Úmodule_namec             #  óÎ   #   • [         R                  " [        S9 n[        U5      U S3-  nUR	                  [        U 5      SS9  X4v •  SSS5        g! , (       d  f       g= f7f)a&  Create a Python file containing the given code in a temporary directory.

Parameters:
    code: The code to write to the temporary file.
    module_name: The name of the temporary module.

Yields:
    module_name: The module name, as to dynamically import it.
    module_path: The module path.
©Úprefixú.pyÚutf8©ÚencodingN)ÚtempfileÚTemporaryDirectoryÚ_TMPDIR_PREFIXr   Ú
write_textr   )Úcoder4   r   Útmpfiles       r$   Útemporary_pyfilerB   5   sW   é € ô 
×	$Ò	$¬NÒ	;¸vÜ�v“, K =°Ð!4Ñ4ˆØ×Ñœ6 $›<°&ÐÑ9ØÐ"Ò"÷ 
<×	;Ö	;üs   ‚A%›0AÁ	A%Á
A"ÁA%T©ÚinitÚinitsc             #  óB  #   • U=(       d    0 n[        U[        5      (       a  [        R                  US5      nSSS.n[        R
                  " [        S9 n[        U5      nSR                  [        U 5      R                  5      nX`-  nUR                  " S0 UD6  U(       a  UR                  S5      R                  5         UR                  5        H¡  u  pšUn[        U	5      R                   H�  nUR                  S5      (       a*  UR                  U5      R                  [!        U
5      SS	9  MC  X¼-  nUR                  " S0 UD6  U(       d  Mb  UR                  S5      R                  5         Mƒ     M£     [#        XgU5      v •  S
S
S
5        g
! , (       d  f       g
= f7f)að  Create a package containing the given modules in a temporary directory.

Parameters:
    package: The package name. Example: `"a"` gives
        a package named `a`, while `"a/b"` gives a namespace package
        named `a` with a package inside named `b`.
        If `init` is false, then `b` is also a namespace package.
    modules: Additional modules to create in the package.
        If a list, simply touch the files: `["b.py", "c/d.py", "e/f"]`.
        If a dict, keys are the file names and values their contents:
        `{"b.py": "b = 1", "c/d.py": "print('hey from c')"}`.
    init: Whether to create an `__init__` module in the top package.
    inits: Whether to create `__init__` modules in subpackages.

Yields:
    A temporary package.
Ú T)ÚparentsÚexist_okr6   Ú.ú__init__.py)r8   z.pyir9   r:   Nr1   )Ú
isinstanceÚlistÚdictÚfromkeysr<   r=   r>   r   ÚjoinÚpartsÚmkdirÚjoinpathÚtouchÚitemsÚendswithr?   r   r   )ÚpackageÚmodulesrD   rE   Úmkdir_kwargsr   Ú
tmpdirpathÚpackage_nameÚpackage_pathr4   Úmodule_contentsÚcurrent_pathÚparts                r$   Útemporary_pypackager`   G   sJ  é € ð2 �m˜€GÜ�'œ4× Ñ Ü—-‘- ¨Ó,ˆØ#°Ñ6€LÜ	×	$Ò	$¬NÒ	;¸vÜ˜&“\ˆ
Ø—x‘x¤ W£× 3Ñ 3Ó4ˆØ!Ñ+ˆØ×ÒÑ*˜\Ò*ÞØ×!Ñ! -Ó0×6Ñ6Ô8Ø,3¯M©M®OÑ(ˆKØ'ˆLÜ˜[Ó)×/Ô/�Ø—=‘= ×1Ñ1Ø ×)Ñ)¨$Ó/×:Ñ:¼6À/Ó;RÐ]cÐ:Ódà Ñ(�LØ ×&Ò&Ñ6¨Ò6ß�uØ$×-Ñ-¨mÓ<×BÑBÖDó 0ñ -<ô ˜°<Ó@Ò@÷# 
<×	;Ö	;üs%   ‚AFÁC6FÅ5FÆ	FÆ
FÆFF)rD   rE   Ú
extensionsÚdocstring_parserÚdocstring_optionsÚlines_collectionÚmodules_collectionÚallow_inspectionÚstore_sourceÚresolve_aliasesÚresolve_externalÚresolve_implicitÚsearch_sys_pathc             #  óâ   #   • U(       a  [         R                  O/ n[        XX#S9 n[        UR                  UR
                  /UQUUUUUU	U
UUUSS9v •  SSS5        g! , (       d  f       g= f7f)aY  Create and visit a temporary package.

Parameters:
    package: The package name. Example: `"a"` gives
        a package named `a`, while `"a/b"` gives a namespace package
        named `a` with a package inside named `b`.
        If `init` is false, then `b` is also a namespace package.
    modules: Additional modules to create in the package.
        If a list, simply touch the files: `["b.py", "c/d.py", "e/f"]`.
        If a dict, keys are the file names and values their contents:
        `{"b.py": "b = 1", "c/d.py": "print('hey from c')"}`.
    init: Whether to create an `__init__` module in the top package.
    inits: Whether to create `__init__` modules in subpackages.
    extensions: The extensions to use.
    docstring_parser: The docstring parser to use. By default, no parsing is done.
    docstring_options: Docstring parsing options.
    lines_collection: A collection of source code lines.
    modules_collection: A collection of modules.
    allow_inspection: Whether to allow inspecting modules when visiting them is not possible.
    store_source: Whether to store code source in the lines collection.
    resolve_aliases: Whether to resolve aliases.
    resolve_external: Whether to try to load unspecified modules to resolve aliases.
        Default value (`None`) means to load external modules only if they are the private sibling
        or the origin module (for example when `ast` imports from `_ast`).
    resolve_implicit: When false, only try to resolve an alias if it is explicitly exported.
    search_sys_path: Whether to search the system paths for the package.

Yields:
    A module.
rC   F©Úsearch_pathsra   rb   rc   rd   re   rf   rg   rh   ri   rj   Úforce_inspectionN)Úsysr   r`   r   r   r   )rW   rX   rD   rE   ra   rb   rc   rd   re   rf   rg   rh   ri   rj   rk   rn   Útmp_packages                    r$   Útemporary_visited_packagerr   x   su   é € öb  /”3—8’8°B€LÜ	˜W°DÒ	FÈ+ÜØ×ÑØ%×,Ñ,Ð<¨|Ð<Ø!Ø-Ø/Ø-Ø1Ø-Ø%Ø+Ø-Ø-Ø"ñ
ò 	
÷ 
G×	FÖ	Füs   ‚$A/¦/AÁ	A/Á
A,Á(A/c             #  óÔ  #   • U(       a  [         R                  O/ n[        XX#S9 n [        UR                  UR
                  /UQUUUUUU	U
UUUSS9v •  [        [         R                  R                  5       5       HD  nUU :X  d  UR                  U  S35      (       d  M$  [         R                  R                  US5        MF     [        5          SSS5        g! [        [         R                  R                  5       5       HD  nUU :X  d  UR                  U  S35      (       d  M$  [         R                  R                  US5        MF     [        5         f = f! , (       d  f       g= f7f)a8  Create and inspect a temporary package.

Parameters:
    package: The package name. Example: `"a"` gives
        a package named `a`, while `"a/b"` gives a namespace package
        named `a` with a package inside named `b`.
        If `init` is false, then `b` is also a namespace package.
    modules: Additional modules to create in the package.
        If a list, simply touch the files: `["b.py", "c/d.py", "e/f"]`.
        If a dict, keys are the file names and values their contents:
        `{"b.py": "b = 1", "c/d.py": "print('hey from c')"}`.
    init: Whether to create an `__init__` module in the top package.
    inits: Whether to create `__init__` modules in subpackages.
    extensions: The extensions to use.
    docstring_parser: The docstring parser to use. By default, no parsing is done.
    docstring_options: Docstring parsing options.
    lines_collection: A collection of source code lines.
    modules_collection: A collection of modules.
    allow_inspection: Whether to allow inspecting modules.
    store_source: Whether to store code source in the lines collection.
    resolve_aliases: Whether to resolve aliases.
    resolve_external: Whether to try to load unspecified modules to resolve aliases.
        Default value (`None`) means to load external modules only if they are the private sibling
        or the origin module (for example when `ast` imports from `_ast`).
    resolve_implicit: When false, only try to resolve an alias if it is explicitly exported.
    search_sys_path: Whether to search the system paths for the package.

Yields:
    A module.
rC   Trm   rJ   N)rp   r   r`   r   r   r   ÚtuplerX   ÚkeysÚ
startswithÚpopr   )rW   rX   rD   rE   ra   rb   rc   rd   re   rf   rg   rh   ri   rj   rk   rn   rq   r   s                     r$   Útemporary_inspected_packagerx   ¼   s(  é € öb  /”3—8’8°B€LÜ	˜W°DÒ	FÈ+ð	 ÜØ× Ñ Ø)×0Ñ0Ð@°<Ð@Ø%Ø!1Ø"3Ø!1Ø#5Ø!1Ø)Ø /Ø!1Ø!1Ø!%ñò ô  œcŸk™k×.Ñ.Ó0Ö1�Ø˜7“? d§o¡o¸¸	À°m×&DÓ&DÜ—K‘K—O‘O D¨$Ö/ñ 2ô Õ÷+ 
GÐ	Føô$ œcŸk™k×.Ñ.Ó0Ö1�Ø˜7“? d§o¡o¸¸	À°m×&DÓ&DÜ—K‘K—O‘O D¨$Ö/ñ 2ô Õú÷+ 
GÕ	FüsA   ‚$E(¦E¨.CÁAEÂ!.EÃ	E(ÃAEÄ%/EÅEÅ
E%Å!E()r4   ra   Úparentrb   rc   rd   re   c             #  óü   #   • [        U 5      n [        XS9 u  p‰U=(       d
    [        5       nU R                  5       Xi'   [	        UU	U UUUUUUS9	n
XªR
                  U'   U
v •  SSS5        g! , (       d  f       g= f7f)a  Create and visit a temporary module with the given code.

Parameters:
    code: The code of the module.
    module_name: The name of the temporary module.
    extensions: The extensions to use when visiting the AST.
    parent: The optional parent of this module.
    docstring_parser: The docstring parser to use. By default, no parsing is done.
    docstring_options: Docstring parsing options.
    lines_collection: A collection of source code lines.
    modules_collection: A collection of modules.

Yields:
    The visited module.
r3   )Úfilepathr@   ra   ry   rb   rc   rd   re   N)r   rB   r   Ú
splitlinesr   re   )r@   r4   ra   ry   rb   rc   rd   re   Ú_r   r2   s              r$   Útemporary_visited_moduler~     s   é € ô6 �$‹<€DÜ	˜$Ò	8¹I¸QØ+×@¬Ó/@ÐØ!%§¡Ó!2ÐÑÜØØØØ!ØØ-Ø/Ø-Ø1ñ

ˆð 28×!Ñ! +Ñ.ØŠ÷ 
9×	8Ö	8üs   ‚A<—AA+Á"	A<Á+
A9Á5A<)r4   Úimport_pathsra   ry   rb   rc   rd   re   c             #  ó°  #   • [        XS9 u  pšU=(       d
    [        5       nU R                  5       Xz'    [        UU
UUUUUUUS9	nX»R                  U'   Uv •  U[
        R                  ;   a  [
        R                  U	 [        5          SSS5        g! U[
        R                  ;   a  [
        R                  U	 [        5         f = f! , (       d  f       g= f7f)aO  Create and inspect a temporary module with the given code.

Parameters:
    code: The code of the module.
    module_name: The name of the temporary module.
    import_paths: Paths to import the module from.
    extensions: The extensions to use when visiting the AST.
    parent: The optional parent of this module.
    docstring_parser: The docstring parser to use. By default, no parsing is done.
    docstring_options: Docstring parsing options.
    lines_collection: A collection of source code lines.
    modules_collection: A collection of modules.

Yields:
    The inspected module.
r3   )r{   r   ra   ry   rb   rc   rd   re   N)rB   r   r|   r
   re   rp   rX   r   )r@   r4   r   ra   ry   rb   rc   rd   re   r}   r   r2   s               r$   Útemporary_inspected_moduler�   4  sÀ   é € ô: 
˜$Ò	8¹I¸QØ+×@¬Ó/@ÐØ!%§¡Ó!2ÐÑð	 ÜØØØ)Ø%ØØ!1Ø"3Ø!1Ø#5ñ
ˆFð 6<×%Ñ% kÑ2ØŠLàœcŸk™kÓ)Ü—K‘K Ð,ÜÕ÷) 
9Ð	8øð$ œcŸk™kÓ)Ü—K‘K Ð,ÜÕú÷) 
9Õ	8üs3   ‚
CŒ(Cµ#BÁ/CÂ	CÂ1CÃCÃ
CÃC)Úreturn_leafc                óž   • U(       d  [        S5      eUS   nUnUSS  H!  nUR                  UR                  U5        UnM#     U (       a  U$ U$ )a  Link objects together, vertically.

Parameters:
    *objects: A sequence of objects. The first one is at the top of the tree.
    return_leaf: Whether to return the leaf instead of the root.

Raises:
    ValueError: When no objects are provided.

Returns:
    The top or leaf object.
ú$At least one object must be providedr   é   N©Ú
ValueErrorÚ
set_memberr   )r‚   ÚobjectsÚtopÚleafÚobjs        r$   Úvtreer�   h  sW   € ö ÜÐ?Ó@Ð@Ø
�!‰*€CØ€DØ�q�r‹{ˆØ�‰˜Ÿ™ #Ô&ØŠñ ö ˆ4Ð' CÐ'r'   c                 ó„   • U (       d  [        S5      eU S   nU SS  H  nUR                  UR                  U5        M!     U$ )a!  Link objects together, horizontally.

Parameters:
    *objects: A sequence of objects. All objects starting at the second become members of the first.

Raises:
    ValueError: When no objects are provided.

Returns:
    The first given object, with all the other objects as members of it.
r„   r   r…   Nr†   )r‰   rŠ   rŒ   s      r$   Úhtreer�     sC   € ö ÜÐ?Ó@Ð@Ø
�!‰*€CØ�q�r‹{ˆØ�‰�s—x‘x Ö%ñ à€Jr'   )Úleaf_packager‚   c               ó  • U R                  S5      n[        U5       VVs/ s H  u  pE[        U[        / USU QSP76 S9PM     nnnU(       d*  US   R                  R                  US   5      nXvS   l        [        USU06$ s  snnf )aK  Link objects together, vertically.

Parameters:
    path: The complete module path, like `"a.b.c.d"`.
    leaf_package: Whether the deepest module should also be a package.
    return_leaf: Whether to return the leaf instead of the root.

Raises:
    ValueError: When no objects are provided.

Returns:
    The top or leaf module.
rJ   NrK   )r{   éÿÿÿÿr‚   )ÚsplitÚ	enumerater   r   r{   Ú	with_stemÚ	_filepathr�   )r   r�   r‚   rQ   Úindexr   rX   r{   s           r$   Úmodule_vtreer˜   “  sŠ   € ð �J‰J�s‹O€EÜ]fÐglÔ]mÔnÒ]mÉkÈeŒv�d¤TÐ%H¨5°°%¨=Ð%H¸-Ò%HÔIÑ]m€GÑnÞØ˜2‘;×'Ñ'×1Ñ1°%¸±)Ó<ˆØ (�‰ÔÜ�'Ð3 {Ñ3Ð3ùó	 os    $B)r@   r   r4   r   r(   zIterator[tuple[str, Path]]r!   )
rW   r   rX   ú(Sequence[str] | Mapping[str, str] | NonerD   ÚboolrE   rš   r(   zIterator[TmpPackage]) rW   r   rX   r™   rD   rš   rE   rš   ra   úExtensions | Nonerb   úDocstringStyle | Parser | Nonerc   úDocstringOptions | Nonerd   úLinesCollection | Nonere   úModulesCollection | Nonerf   rš   rg   rš   rh   rš   ri   zbool | Nonerj   rš   rk   rš   r(   úIterator[Module])r@   r   r4   r   ra   r›   ry   úModule | Nonerb   rœ   rc   r�   rd   rž   re   rŸ   r(   r    )r@   r   r4   r   r   zlist[Path] | Nonera   r›   ry   r¡   rb   rœ   rc   r�   rd   rž   re   rŸ   r(   r    )r‰   r   r‚   rš   r(   r   )r‰   r   r(   r   )r   r   r�   rš   r‚   rš   r(   r   )2Ú
__future__r   rp   r<   Ú
contextlibr   Údataclassesr   Ú	importlibr   Úpathlibr   Útextwrapr   Útypingr	   Ú!griffe._internal.agents.inspectorr
   Úgriffe._internal.agents.visitorr   Úgriffe._internal.collectionsr   Úgriffe._internal.loaderr   Úgriffe._internal.modelsr   r   Úcollections.abcr   r   r   r   Ú#griffe._internal.docstrings.parsersr   r   Úgriffe._internal.enumerationsr   Ú griffe._internal.extensions.baser   r>   r   rB   r`   rr   rx   r~   r�   r�   r�   r˜   r1   r'   r$   Ú<module>r²      sû  ðõ
 #ã 
Û Ý %Ý !Ý 'Ý Ý Ý  å 5Ý 1Ý 8Ý (ß 2æß;Ñ;å>ßTÝ4Ý;à€ð ÷(ð (ó ð(ð& Ø6>ö #ó ð#ð" ð 9=ð-Að Øñ-AØð-Aà5ð-Að ð	-Að
 ð-Að õ-Aó ð-Að` ð 9=ð@
ð ØØ$(Ø7;Ø15Ø/3Ø37Ø"ØØ!Ø$(Ø"Ø!ñ!@
Øð@
à5ð@
ð ð	@
ð
 ð@
ð "ð@
ð 5ð@
ð /ð@
ð -ð@
ð 1ð@
ð ð@
ð ð@
ð ð@
ð "ð@
ð ð@
ð  ð!@
ð" õ#@
ó ð@
ðF ð 9=ðF ð ØØ$(Ø7;Ø15Ø/3Ø37Ø!ØØ!Ø$(Ø"Ø!ñ!F ØðF à5ðF ð ð	F ð
 ðF ð "ðF ð 5ðF ð /ðF ð -ðF ð 1ðF ð ðF ð ðF ð ðF ð "ðF ð ðF ð  ð!F ð" õ#F ó ðF ðR ð  Ø$(Ø Ø7;Ø15Ø/3Ø37ñ*Ø
ð*ð ð*ð "ð	*ð
 ð*ð 5ð*ð /ð*ð -ð*ð 1ð*ð ô*ó ð*ðZ ð  Ø&*Ø$(Ø Ø7;Ø15Ø/3Ø37ñ0 Ø
ð0 ð ð0 ð $ð	0 ð
 "ð0 ð ð0 ð 5ð0 ð /ð0 ð -ð0 ð 1ð0 ð ô0 ó ð0 ðf 16÷ (ô.ð( 59Èe÷ 4ð 4r'   