Ë
    hKêjV  ã                  ó¨   — U d Z ddlmZ ddlmZ ddlmZ ddlmZm	Z	 ddl
Z
ddlmZ er
ddlZddlmZ  eh d	£«      Zd
ed<   edd„«       Zdd„ZdgZy)zSTest helpers that keep platformdirs away from the real user and system directories.é    )Úannotations)Úcontextmanager)ÚPath)ÚTYPE_CHECKINGÚFinalN)ÚPlatformDirsABC)Ú	Generator>   Úsite_logÚuser_logÚ	site_dataÚ	user_dataÚ
site_cacheÚ
site_stateÚ
user_cacheÚ
user_stateÚsite_configÚuser_configÚsite_runtimeÚuser_runtimeÚuser_preferencezFinal[frozenset[str]]Ú
_APP_KINDSc              #  ó,  K  — t        | «      j                  «       }t        j                  D �ci c]:  }|t	        ||j                  d«      x}z  |t        v |j                  d«      ¬«      “Œ< }}|t        t        «      j                  «       D ��ci c]/  \  }}|dk(  s"|j                  d«      r|j                  d«      r||“Œ1 c}}z  }t        j                  }|D �ci c]  }|t        |«      v sŒ|t        |«      |   “Œ! }}|j                  «       D ]  \  }}t        |||«       Œ 	 |–— |D ]#  }||v rt        ||||   «       Œt        ||«       Œ% yc c}w c c}}w c c}w # |D ]#  }||v rt        ||||   «       Œt        ||«       Œ% w xY w­w)a  Resolve every directory of :data:`~platformdirs.PlatformDirs` under ``root`` while the context is active.

    Each kind maps to ``<root>/<kind>``, where ``kind`` is the property name without ``_dir``, such as ``user_config``.
    The data, config, cache, state, log, runtime and preference kinds append ``appname`` and ``version``, so
    ``PlatformDirs("app", version="1.0").user_config_path`` becomes ``<root>/user_config/app/1.0``. Every thread of the
    current process sees the change, and subprocesses do not.

    On Unix, ``use_site_for_root`` is ignored inside the context so user and site directories keep separate kinds. A
    relative ``root`` is made absolute on entry, so changing the working directory does not move the isolation root.

    :param root: directory that holds the redirected directories

    :returns: the absolute isolation root as a :class:`~pathlib.Path`

    Ú_dirÚuser_)ÚappÚprivateÚ	_use_siteÚ_site_Ú_dirsN)r   Úabsoluter   Ú__abstractmethods__Ú	_redirectÚremovesuffixr   Ú
startswithÚvarsÚitemsÚendswithÚplatformdirsÚPlatformDirsÚsetattrÚdelattr)ÚrootÚbaseÚnameÚkindÚpatchesÚvalueÚclsÚsaveds           úY/home/oem/CyberBrain26-unified/.venv/lib/python3.12/site-packages/platformdirs/testing.pyÚisolated_dirsr5   !   s«  è ø€ ô" �‹:×ÑÓ €Dô
 $×7Ñ7ö	ð ð 	ŒiØ˜D×-Ñ-¨fÓ5Ð5�DÑ6¸DÄJÐ<NÐX\×XgÑXgÐhoÓXpô
ñ 	
ð€Gð ð ä¤Ó0×6Ñ6Ó8÷áˆD�%Ø�;Ò 4§?¡?°8Ô#<ÀÇÁÈwÔAWð 	ˆe‰óñ €Gô
 ×
#Ñ
#€CØ/6ÖL t¸$Ä$ÀsÃ)Ò:KˆT”4˜“9˜T‘?Ñ"ÐL€EÐLØ—}‘}“ò "‰ˆˆeÜ��T˜5Õ!ð"ð#ØŠ
àò 	#ˆDØ�u‰}Ü˜˜T 5¨¡;Õ/ä˜˜TÕ"ñ		#ùò'ùóùò Møð ò 	#ˆDØ�u‰}Ü˜˜T 5¨¡;Õ/ä˜˜TÕ"ñ		#üsF   ‚,F®?EÁ-#FÂ4EÃFÃE"Ã1E"Ä'FÄ*E' Ä.9FÅ'*FÆFc               ó.   ‡ ‡‡— dˆˆ ˆfd„}t        |«      S )Nc                óV   •— ‰r| j                  t        ‰«      ‰¬«      S t        ‰«      S )N)r   )Ú_append_app_name_and_versionÚstr)Úselfr   Úpathr   s    €€€r4   Úresolvez_redirect.<locals>.resolveN   s+   ø€ ÙPSˆt×0Ñ0´°T³ÀGÐ0ÓLÐbÔY\Ð]aÓYbÐbó    )r:   r   Úreturnr9   )Úproperty)r;   r   r   r<   s   ``` r4   r"   r"   M   s   ú€ ÷cô �GÓÐr=   r5   )r,   zstr | os.PathLike[str]r>   zGenerator[Path, None, None])r;   r   r   Úboolr   r@   r>   r?   )Ú__doc__Ú
__future__r   Ú
contextlibr   Úpathlibr   Útypingr   r   r(   Úplatformdirs.apir   ÚosÚcollections.abcr	   Ú	frozensetr   Ú__annotations__r5   r"   Ú__all__© r=   r4   ú<module>rM      s`   ðÚ Yå "å %Ý ß 'ã Ý ,áÛÝ)á$-ò /ó %€
Ð!ó ð" ò(#ó ð(#óVð ð�r=   