ó
    EñiN2  ã                  ó„  • % 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rS SK	J
r
  S SKrS SKJr  S S	KJ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9 " S S5      5       r\\\4   rS\S'   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r#            S%S jr$S&S jr%g)'é    )Úannotations)ÚIterable)ÚSequence)Ú	dataclass)ÚKW_ONLYN)ÚPath)ÚLiteral)Ú	TypeAliasé   )Ú
UsageError)Úfail©Úabsolutepath)Ú
commonpath©Úsafe_existsT)Úfrozenc                  óB   • \ rS rSr% SrS\S'   S\S'   S\S'   S	\S
'   Srg)ÚConfigValueé   a  Represents a configuration value with its origin and parsing mode.

This allows tracking whether a value came from a configuration file
or from a CLI override (--override-ini), which is important for
determining precedence when dealing with ini option aliases.

The mode tracks the parsing mode/data model used for the value:
- "ini": from INI files or [tool.pytest.ini_options], where the only
  supported value types are `str` or `list[str]`.
- "toml": from TOML files (not in INI mode), where native TOML types
   are preserved.
ÚobjectÚvaluer   Ú_zLiteral['file', 'override']ÚoriginzLiteral['ini', 'toml']Úmode© N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__annotations__Ú__static_attributes__r   ó    ÚU/home/mande/repo/quber/.venv/lib/python3.13/site-packages/_pytest/config/findpaths.pyr   r      s   ‡ ñð ƒMØƒJØ'Ó'Ø
 Ö r$   r   r
   Ú
ConfigDictc                ó¤   •  [         R                  " [        U 5      5      $ ! [         R                   a  n[	        [        U5      5      UeSnAff = f)z�Parse the given generic '.ini' file using legacy IniConfig parser, returning
the parsed object.

Raise UsageError if the file cannot be parsed.
N)Ú	iniconfigÚ	IniConfigÚstrÚ
ParseErrorr   )ÚpathÚexcs     r%   Ú_parse_ini_configr.   .   sC   € ð,Ü×"Ò"¤3 t£9Ó-Ð-øÜ×Ñó ,Üœ˜S›Ó"¨Ð+ûð,ús   ‚! ¡AµA
Á
Ac                ó®  • U R                   S:X  aW  [        U 5      nSU;   a2  US   R                  5        VVs0 s H  u  p#U[        USSS9_M     snn$ U R                  S;   a  0 $  gU R                   S:X  ay  [        U 5      nSUR
                  ;   a2  US   R                  5        VVs0 s H  u  p#U[        USSS9_M     snn$ SUR
                  ;   a  [        [        R                  S	S
9SS9  gU R                   S:X  Ga‡  [        R                  S:¼  a  SSKnOSSKnU R                  SS9n UR                  U5      nU R                  S;   aJ  UR#                  S0 5      nU(       a/  UR                  5        VVs0 s H  u  p#U[        USSS9_M     snn$ 0 $ UR#                  S0 5      R#                  S0 5      n	U	R                  5        VVs0 s H  u  p#US:w  d  M  X#_M     n
nnU	R#                  SS5      nU
(       a  U(       a  [!        U  S35      eU
(       a/  U
R                  5        VVs0 s H  u  p#U[        USSS9_M     snn$ Ub:  SS jnUR                  5        VVs0 s H  u  p#U[        U" U5      SSS9_M     snn$ gs  snnf s  snnf ! UR                   a  n[!        U  SU 35      UeSnAff = fs  snnf s  snnf s  snnf s  snnf )zˆLoad pytest configuration from the given file path, if supported.

Return None if the file does not contain valid pytest configuration.
z.iniÚpytestÚfileÚini©r   r   >   ú
pytest.iniú.pytest.iniz.cfgztool:pytestú	setup.cfg)ÚfilenameF)Úpytracez.toml)é   é   r   Nzutf-8)Úencodingz: )úpytest.tomlú.pytest.tomlÚtomlÚtoolÚini_optionszó: Cannot use both [tool.pytest] (native TOML types) and [tool.pytest.ini_options] (string-based INI format) simultaneously. Please use [tool.pytest] with native TOML types (recommended) or [tool.pytest.ini_options] for backwards compatibility.c                óF   • [        U [        5      (       a  U $ [        U 5      $ ©N)Ú
isinstanceÚlistr*   )Úvs    r%   Úmake_scalarÚ/load_config_dict_from_file.<locals>.make_scalar“   s   € Ü *¨1¬d× 3Ñ 3˜1Ð?¼¸Q»Ð?r$   )rE   r   Úreturnzstr | list[str])Úsuffixr.   Úitemsr   ÚnameÚsectionsr   ÚCFG_PYTEST_SECTIONÚformatÚsysÚversion_infoÚtomllibÚtomliÚ	read_textÚloadsÚTOMLDecodeErrorr   Úget)Úfilepathr(   ÚkrE   rQ   Ú	toml_textÚconfigr-   Úpytest_configÚtool_pytestÚtoml_configÚ
ini_configrF   s                r%   Úload_config_dict_from_filer_   :   s'  € ð ‡�˜&Ó Ü% hÓ/ˆ	à�yÓ ð & hÑ/×5Ñ5Ô7ôâ7‘D�Að ”;˜q¨°eÑ<Ò<Ù7òð ð �}‰}Ð =Ó=Ø�	ð >ð^ ðW 
�‰˜FÓ	"Ü% hÓ/ˆ	à˜I×.Ñ.Ó.ð & mÑ4×:Ñ:Ô<ôâ<‘D�Að ”;˜q¨°eÑ<Ò<Ù<òð ð ˜×+Ñ+Ó+ô Ô#×*Ñ*°KÐ*Ð@È%ÒPð@ ðw 
�‰˜GÔ	#Ü×Ñ˜wÓ&Üã#à×&Ñ&°Ð&Ð8ˆ	ð	<Ø—]‘] 9Ó-ˆFð
 �=‰=Ð;Ó;Ø"ŸJ™J x°Ó4ˆMÞð !.× 3Ñ 3Ô 5ôâ 5™˜ð ”{ 1¨V¸&ÑAÒAÙ 5òð ð
 ˆIð !Ÿ*™* V¨RÓ0×4Ñ4°X¸rÓBˆKð -8×,=Ñ,=Ô,?ÔVÒ,?¡D AÀ1ÈÑCU›4˜1š4Ñ,?ˆKÑVà$Ÿ™¨¸Ó=ˆJæžzÜ Ø�jð !Pð Póð ö ð !,× 1Ñ 1Ô 3ôâ 3™˜ð ”{ 1¨V¸&ÑAÒAÙ 3òð ð
 Ñ'ô@ð
 !+× 0Ñ 0Ô 2ôâ 2™˜ð ”{¡;¨q£>¸&ÀuÑMÒMÙ 2òð ð
 ùókùóøð* ×&Ñ&ó 	<Ü ˜z¨¨C¨5Ð1Ó2¸Ð;ûð	<üóùó WùóùósA   ¸J
Â)JÄ/J Å<J?ÇKÇKÈ0KÉ'KÊJ<Ê&J7Ê7J<c                ór  • / SQnU Vs/ s H&  n[        U5      R                  S5      (       a  M$  UPM(     nnU(       d  U /nSn/ nU HÏ  n[        U5      nU/UR                  Q7 H­  nU H¤  n	X‰-  n
U
R	                  5       (       d  M  U
R
                  S:X  a  Uc  U
n[        U
5      nUc  MC  UR                  U	5      nX,S-   S  H=  nX�-  nUR	                  5       (       d  M  [        U5      c  M,  UR                  U5        M?     XŠXµ4s  s  s  $    M¯     MÑ     Ub  UR                  U0 / 4$ SS0 / 4$ s  snf )zýSearch in the list of arguments for a valid ini-file for pytest,
and return a tuple of (rootdir, inifile, cfg-dict, ignored-config-files), where
ignored-config-files is a list of config basenames found that contain
pytest configuration but were ignored.)r<   r=   r4   r5   úpyproject.tomlztox.inir6   Ú-Nra   r   )
r*   Ú
startswithr   ÚparentsÚis_filerK   r_   ÚindexÚappendÚparent)Úinvocation_dirÚargsÚconfig_namesÚxÚfound_pyproject_tomlÚignored_config_filesÚargÚargpathÚbaseÚconfig_nameÚpr^   rf   Ú	remainderÚp2s                  r%   Úlocate_configrv   ž   sF  € ò€Lñ Ó:’t�!¤3 q£6×#4Ñ#4°S×#9�A‘t€DÐ:ÞØÐˆØ(,ÐØ&(ÐãˆÜ˜sÓ#ˆØÐ/˜wŸ™Ô/ˆDÛ+�ØÑ&�Ø—9‘9—;“;Ø—v‘vÐ!1Ó1Ð6JÑ6RØ/0Ð,Ü!;¸AÓ!>�JØ!Ó-Ø ,× 2Ñ 2°;Ó ?˜Ø)5¸a±i°kÓ)B˜IØ!%Ñ!1˜Bà "§
¡
§£Ü$>¸rÓ$BÓ$Nà 4× ;Ñ ;¸IÖ Fñ *Cð  $¨
ÐHÖHó  ,ó 0ñ ð& Ñ'Ø#×*Ñ*Ð,@À"ÀbÐHÐHØ��r˜2ÐÐùò7 ;s
   ‰#D4°D4c                ó  • S nU H\  nUR                  5       (       d  M  Uc  UnM!  X#R                  ;   d  X2:X  a  M7  X2R                  ;   a  UnMJ  [        X25      nUc  MZ  UnM^     Uc  U nU$ UR                  5       (       a  UR                  nU$ rB   )Úexistsrd   r   re   rh   )ri   ÚpathsÚcommon_ancestorr,   Úshareds        r%   Úget_common_ancestorr|   Í   s›   € ð $(€OÛˆØ�{‰{�}‰}ÙØÑ"Ø"ŠOà§,¡,Ó.°$Ó2IÙØ×0Ñ0Ó0Ø"&’ä# DÓ:�ØÓ%Ø&,’Oñ ð ÑØ(ˆð Ðð 
×	 Ñ	 ×	"Ñ	"Ø)×0Ñ0ˆØÐr$   c                óž   ^^• SS jmSS jmSS jnUU4S jU  5       nU Vs/ s H  n[        U5      (       d  M  U" U5      PM     sn$ s  snf )Nc                ó$   • U R                  S5      $ )Nrb   )rc   ©rl   s    r%   Ú	is_optionÚ%get_dirs_from_args.<locals>.is_optionè   s   € Ø�|‰|˜CÓ Ð r$   c                ó*   • U R                  S5      S   $ )Nz::r   )Úsplitr   s    r%   Úget_file_part_from_node_idÚ6get_dirs_from_args.<locals>.get_file_part_from_node_idë   s   € Ø�w‰w�t‹}˜QÑÐr$   c                óH   • U R                  5       (       a  U $ U R                  $ rB   )Úis_dirrh   )r,   s    r%   Úget_dir_from_pathÚ-get_dirs_from_args.<locals>.get_dir_from_pathî   s   € Ø�;‰;�=‰=ØˆKØ�{‰{Ðr$   c              3  ód   >#   • U  H%  nT" U5      (       a  M  [        T" U5      5      v •  M'     g 7frB   r   )Ú.0ro   r„   r€   s     €€r%   Ú	<genexpr>Ú%get_dirs_from_args.<locals>.<genexpr>ô   s/   øé € ð âˆCÙ˜�~ó 	6ŒÑ/°Ó4×5Ð5Úùs   ƒ0˜0)rl   r*   rH   Úbool)rl   r*   rH   r*   )r,   r   rH   r   r   )rj   rˆ   Úpossible_pathsr,   r„   r€   s       @@r%   Úget_dirs_from_argsr�   ç   sK   ù€ ô!ô ôõáó€Nñ 1?ÓT²¨Ä+Èd×BSÓ#Ñ˜dÖ#±ÑTÐTùÒTs
   £A
»A
c                ó¸   • 0 nU =(       d    S H%  n UR                  SS5      u  p4[        USSS9X'   M'     U$ ! [         a  n[        SU< S35      UeS	nAff = f)
z‰Parse the -o/--override-ini command line arguments and return the overrides.

:raises UsageError:
    If one of the values is malformed.
r   Ú=r   Úoverrider2   r3   z3-o/--override-ini expects option=value style (got: z).N)rƒ   r   Ú
ValueErrorr   )Úoverride_iniÚ	overridesr^   ÚkeyÚuser_ini_valueÚes         r%   Úparse_override_inirš   ý   s‚   € ð €Ið #×( bÒ(ˆ
ð	XØ",×"2Ñ"2°3¸Ó":ÑˆCô )¨À
ÐQVÑWˆI‹Nñ )ð Ðøô ó 	ÜØEÀjÁ^ÐSUÐVóàðûð	ús   ’9¹
AÁAÁAz][pytest] section in {filename} files is no longer supported, change to [tool:pytest] instead.c                ó’  • Sn[        U5      n/ nU (       a1  [        U 5      nUn	[        U5      =(       d    0 n
Uc  UR                  nO‰[	        XF5      n[        XK/5      u  pYp§Ucl  Uci  U/UR                  Q7 H  nUS-  R                  5       (       d  M  Un  O8   Xk/:w  a  [        XF5      u  pYp­Uc  [	        XDU/5      n[        U5      (       a  UnU(       aL  [        [        R                  R                  U5      5      nUR                  5       (       d  [        SU S35      e[        U5      nU
R                  U5        Uc   eXYX§4$ )aÒ  Determine the rootdir, inifile and ini configuration values from the
command line arguments.

:param inifile:
    The `--inifile` command line argument, if given.
:param override_ini:
    The -o/--override-ini command line arguments, if given.
:param args:
    The free command line arguments.
:param rootdir_cmd_arg:
    The `--rootdir` command line argument, if given.
:param invocation_dir:
    The working directory when pytest was invoked.

:raises UsageError:
Nzsetup.pyzDirectory 'z+' not found. Check your '--rootdir' option.)r�   r   r_   rh   r|   rv   rd   re   Ú
is_fs_rootÚosr,   Ú
expandvarsr‡   r   rš   Úupdate)Úinifiler•   rj   Úrootdir_cmd_argri   ÚrootdirÚdirsrn   Úinipath_ÚinipathÚinicfgÚancestorÚpossible_rootdirr   Úini_overridess                  r%   Údetermine_setuprª     s^  € ð0 €GÜ˜dÓ#€DØ*,ÐæÜ Ó(ˆØ'ˆÜ+¨HÓ5×;¸ˆØÑ"Ø—o‘oˆGøä& ~Ó<ˆÜ9FØ˜Jó:
Ñ6ˆ˜&ð ‰?˜Ñ6Ø%-Ð$A°×0@Ñ0@Ô$AÐ Ø$ zÑ1×:Ñ:×<Ó<Ø.�GÙñ %Bð
 ˜:Ó%Ü2?ÀÓ2UÑ/�G fØ‘?Ü1Ø&¸Ð(Bó�Gô " '×*Ñ*Ø"*˜ÞÜœrŸw™w×1Ñ1°/ÓBÓCˆØ�~‰~×ÑÜØ˜g˜YÐ&QÐRóð ô ' |Ó4€MØ
‡M�M�-Ô àÑÐÐØ˜VÐ9Ð9r$   c                óz   • [         R                  R                  [        U 5      5      S   [         R                  :H  $ )z{
Return True if the given path is pointing to the root of the
file system ("/" on Unix and "C:\\" on Windows for example).
r   )r�   r,   Ú
splitdriver*   Úsep)rs   s    r%   rœ   rœ   Y  s+   € ô
 �7‰7×Ñœc !›fÓ% aÑ(¬B¯F©FÑ2Ð2r$   )r,   r   rH   ziniconfig.IniConfig)rW   r   rH   zConfigDict | None)ri   r   rj   úIterable[Path]rH   z:tuple[Path | None, Path | None, ConfigDict, Sequence[str]])ri   r   ry   r®   rH   r   )rj   zIterable[str]rH   z
list[Path])r•   úSequence[str] | NonerH   r&   )r    ú
str | Noner•   r¯   rj   zSequence[str]r¡   r°   ri   r   rH   z3tuple[Path, Path | None, ConfigDict, Sequence[str]])rs   r   rH   rŽ   )&Ú
__future__r   Úcollections.abcr   r   Údataclassesr   r   r�   Úpathlibr   rO   Útypingr	   r
   r(   Ú
exceptionsr   Ú_pytest.outcomesr   Ú_pytest.pathlibr   r   r   r   Údictr*   r&   r"   r.   r_   rv   r|   r�   rš   rM   rª   rœ   r   r$   r%   Ú<module>rº      s'  ðÞ "å $Ý $Ý !Ý Û 	Ý Û 
Ý Ý ã å "Ý !Ý (Ý &Ý 'ñ �$Ñ÷!ð !ó ð!ð( ˜S +Ð-Ñ.€
ˆIÓ .ô	,ðaØðaàôaðH,Øð,à
ð,ð @ô,ð^Øðàðð 
ôô4Uô,ð, uÐ ð@:àð@:ð 'ð@:ð ð	@:ð
  ð@:ð ð@:ð 9ô@:õF3r$   