Ë
    •Kêj¹&  ã                  ó:  — d Z ddlmZ ddlZddlmZ ddlmZ ddlZddlZddl	m
Z
 ddlmZ ddlmZ dd	lmZ dd
lmZ ddlmZ ddlmZ ddlmZ ddlZ G d„ dej,                  «      Zdd„Z ej2                  d¬«      dd„«       Zdd„Zdd„Zdd„Zdd„Zdd„Zy)z3Version info, help messages, tracing configuration.é    )ÚannotationsN)Ú	Generator)ÚSequence)ÚAny)ÚConfig)ÚExitCode)Ú	PrintHelp)Ú_ini_type_repr)Ú_split_help_text)ÚParser)ÚTerminalReporterc                  óV   ‡ — e Zd ZdZddœ	 	 	 	 	 	 	 dˆ fd„Z	 d	 	 	 	 	 	 	 	 	 dd„Zˆ xZS )	Ú
HelpActiona2  An argparse Action that will raise a PrintHelp exception in order to skip
    the rest of the argument parsing when --help is passed.

    This prevents argparse from raising UsageError when `--help` is used along
    with missing required arguments when any are defined, for example by
    ``pytest_addoption``. This is similar to the way that the builtin argparse
    --help option is implemented by raising SystemExit.

    To opt in to this behavior, the parse caller must set
    `namespace._raise_print_help = True`. Otherwise it just sets the option.
    N)Úhelpc               ó0   •— t         ‰| �  ||ddd|¬«       y )Nr   TF)Úoption_stringsÚdestÚnargsÚconstÚdefaultr   )ÚsuperÚ__init__)Úselfr   r   r   Ú	__class__s       €úW/home/oem/CyberBrain26-unified/.venv/lib/python3.12/site-packages/_pytest/helpconfig.pyr   zHelpAction.__init__$   s)   ø€ ô 	‰ÑØ)ØØØØØð 	õ 	
ó    c                ól   — t        || j                  | j                  «       t        |dd«      rt        ‚y )NÚ_raise_print_helpF)Úsetattrr   r   Úgetattrr	   )r   ÚparserÚ	namespaceÚvaluesÚoption_strings        r   Ú__call__zHelpAction.__call__0   s/   € ô 	�	˜4Ÿ9™9 d§j¡jÔ1ä�9Ð1°5Ô9ÜˆOð :r   )r   zSequence[str]r   Ústrr   ú
str | NoneÚreturnÚNone)N)
r!   zargparse.ArgumentParserr"   zargparse.Namespacer#   zstr | Sequence[Any] | Noner$   r'   r(   r)   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r%   Ú__classcell__)r   s   @r   r   r      sn   ø„ ñ
ð OSñ

Ø+ð

Ø36ð

ØAKð

à	õ

ð" %)ð
à'ð
ð &ð
ð +ð	
ð
 "ð
ð 
÷
r   r   c           	     óh  — | j                  d«      }|j                  dddddd¬«       |j                  d	d
t        dd¬«       |j                  dddg dd¬«       |j                  dddd¬«       |j                  ddddd¬«       |j                  ddddd d!d"¬#«       |j                  d$d%d&dd'¬(«       y ))NÚdebugconfigz-Vz	--versionÚcountr   ÚversionzoDisplay pytest version and information about plugins. When given twice, also display information about plugins.)Úactionr   r   r   z-hz--helpr   z(Show help message and configuration info)r3   r   r   z-pÚappendÚpluginsÚnamez­Early-load given plugin module name or entry point (multi-allowed). To avoid loading of plugins, use the `no:` prefix, e.g. `no:doctest`. See also --disable-plugin-autoload.)r3   r   r   Úmetavarr   z--disable-plugin-autoloadÚ
store_trueFz•Disable plugin auto-loading through entry point packaging metadata. Only plugins explicitly specified in -p or env var PYTEST_PLUGINS will be loaded.)r3   r   r   z--traceconfigz--trace-configz)Trace considerations of conftest.py filesz--debugÚstoreú?zpytestdebug.logÚdebugÚDEBUG_FILE_NAMEzšStore internal tracing debug information in this log file. This file is opened with 'w' and truncated as a result, care advised. Default: pytestdebug.log.)r3   r   r   r   r7   r   z-oz--override-iniÚoverride_inizhOverride configuration option with "option=value" style, e.g. `-o strict_xfail=True -o cache_dir=cache`.)r   r3   r   )ÚgetgroupÚ	addoptionÚ
_addoptionr   )r!   Úgroups     r   Úpytest_addoptionrB   =   s  € Ø�O‰O˜MÓ*€EØ	‡O�OØØØØØðDð ô ð 
×ÑØØÜØØ7ð ô ð 
×ÑØØØØØð<ð ô 	ð 
‡O�OØ#ØØð\ð	 ô ð 
‡O�OØØØØØ8ð ô ð 
‡O�OØØØØØØ!ð$ð ô 
ð 
×ÑØØØØð:ð õ r   T)Úwrapperc               #  óÊ  ‡‡‡K  — d –—Š‰j                   j                  �r@‰j                   j                  } t        | dd¬«      Š‰j                  dj	                  t
        j                  dj                  t        t        t        j                  «      «      ‰j                  j                  t        j                  «       ‰j                  j                   «      «       ‰j"                  j$                  j'                  ‰j                  «       ‰j(                  j+                  «       Št        j,                  j                  d| › d�«       d	ˆˆˆfd„}‰j/                  |«       ‰S ­w)
NÚwzutf-8)Úencodingz@versions pytest-{}, python-{}
invocation_dir={}
cwd={}
args={}

ú.z$writing pytest debug information to ú
c                 óØ   •— ‰j                  «        t        j                  j                  d‰j                  › d�«       ‰ j
                  j                  j                  d «        ‰«        y )Nz"wrote pytest debug information to rH   )ÚcloseÚsysÚstderrÚwriter6   ÚtraceÚrootÚ	setwriter)ÚconfigÚ	debugfileÚundo_tracings   €€€r   Úunset_tracingz+pytest_cmdline_parse.<locals>.unset_tracing’   sL   ø€ Ø�O‰OÔÜ�J‰J×ÑÐAÀ)Ç.Á.ÐAQÐQSÐTÔUØ�L‰L×Ñ×'Ñ'¨Ô-Ù�Nr   )r(   r)   )Úoptionr;   ÚopenrM   ÚformatÚpytestÚ__version__ÚjoinÚmapr&   rK   Úversion_infoÚinvocation_paramsÚdirÚosÚgetcwdÚargsrN   rO   rP   ÚpluginmanagerÚenable_tracingrL   Úadd_cleanup)ÚpathrT   rQ   rR   rS   s     @@@r   Úpytest_cmdline_parserf   |   s  úè ø€ â€Fà‡}�}×Óà�}‰}×"Ñ"ˆÜ˜˜s¨WÔ5ˆ	Ø�‰ð@ß@FÁÜ×"Ñ"Ø—‘œœS¤#×"2Ñ"2Ó3Ó4Ø×(Ñ(×,Ñ,Ü—	‘	“Ø×(Ñ(×-Ñ-óAô		
ð 	�‰×Ñ×#Ñ# I§O¡OÔ4Ø×+Ñ+×:Ñ:Ó<ˆÜ�
‰
×ÑÐ?À¸vÀRÐHÔI÷	ð 	×Ñ˜=Ô)à€Mùs   …EE#c                óö   — t         j                  j                  dt        j                  › dt        j
                  › d�«       t        | «      }|r*|D ]$  }t         j                  j                  |dz   «       Œ& yy)z<Show verbose pytest version installation, including plugins.zThis is pytest version z, imported from rH   N)rK   ÚstdoutrM   rX   rY   Ú__file__Úgetpluginversioninfo)rQ   Ú
plugininfoÚlines      r   Úshow_version_verboserm   �   sm   € ä‡J�J×ÑØ
!¤&×"4Ñ"4Ð!5Ð5EÄfÇoÁoÐEVÐVXÐYôô & fÓ-€JÙØò 	*ˆDÜ�J‰J×Ñ˜T D™[Õ)ñ	*ð r   c                ó  — | j                   j                  dkD  rt        | «       t        j                  S | j                   j
                  r;| j                  «        t        | «       | j                  «        t        j                  S y )Né   )	rU   r2   rm   r   ÚOKr   Ú_do_configureÚshowhelpÚ_ensure_unconfigure)rQ   s    r   Úpytest_cmdline_mainrt   ¨   sb   € ð ‡}�}×Ñ˜qÒ Ü˜VÔ$Ü�{‰{ÐØ	�‰×	Ò	Ø×ÑÔÜ�ÔØ×"Ñ"Ô$Ü�{‰{ÐØr   c                ó"  — | j                   j                  d«      }|€J ‚|j                  }|j                  | j                  j
                  j                  «       «       |j                  «        |j                  d«       |j                  «        |j                  }d}d|z  }| j                  j                  D ]ù  }| j                  j                  |   \  }}}	|€t        d|› �«      ‚|› dt        |«      › d�}
|j                  d|
› �«       t        |
«      }t        |||z
  «      }||d	z
  kD  r0|j                  «        |D ]  }|j                  |r||z   nd
«       Œ Œ§|j                  d||z
  dz
  z  «       |sŒÄ|j                  |d   «       |dd  D ]  }|j                  |r||z   nd
«       Œ Œû |j                  «        |j                  d«       g d¢}|D ]  \  }}|j                  d|d›d|› �«       Œ |j                  «        |j                  «        |j                  d«       |j                  d«       |j                  d«       |j                  j                  dg «      D ]"  }|j                  d|j                   z   d¬«       Œ$ y )NÚterminalreporterzo[pytest] configuration options in the first pytest.toml|pytest.ini|tox.ini|setup.cfg|pyproject.toml file found:é   ú z!help argument cannot be None for z (z):ú  é   Ú é   r   ro   zEnvironment variables:)	)ÚCIzlWhen set to a non-empty value, pytest knows it is running in a CI process and does not truncate summary info)ÚBUILD_NUMBERzEquivalent to CI)ÚPYTEST_ADDOPTSzExtra command line options)ÚPYTEST_PLUGINSz.Comma-separated plugins to load during startup)ÚPYTEST_DISABLE_PLUGIN_AUTOLOADz"Set to disable plugin auto-loading)ÚPYTEST_DEBUGz1Set to enable debug tracing of pytest's internals)ÚPYTEST_DEBUG_TEMPROOTz'Override the system temporary directory)ÚPYTEST_THEMEz)The Pygments style to use for code output)ÚPYTEST_THEME_MODEz3Set the PYTEST_THEME to be either 'dark' or 'light'z<24z/to see available markers type: pytest --markersz1to see available fixtures type: pytest --fixtureszˆ(shown according to specified file_or_dir or current dir if not specified; fixtures with leading '_' are only shown with the '-v' optionÚwarningsz
warning : T)Úred)rb   Ú
get_pluginÚ_twrM   Ú_parserÚ	optparserÚformat_helprl   Ú	fullwidthÚ_inidictÚ	TypeErrorr
   Úlenr   ÚstatsÚgetÚmessage)rQ   ÚreporterÚtwÚcolumnsÚ
indent_lenÚindentr6   r   ÚtypeÚ_defaultÚspecÚspec_lenÚwrappedrl   ÚvarsÚwarningreports                   r   rr   rr   ¶   s{  € Ø(.×(<Ñ(<×(GÑ(GØó)€Hð ÐÐÐØ	�‰€BØ‡H�HˆV�^‰^×%Ñ%×1Ñ1Ó3Ô4Ø‡G�G„IØ‡G�Gð	Nôð ‡G�G„Ià�l‰l€GØ€JØ�:Ñ€FØ—‘×'Ñ'ò ;ˆØ%Ÿ~™~×6Ñ6°tÑ<Ñˆˆd�HØˆ<ÜÐ?À¸vÐFÓGÐGØ��rœ.¨Ó.Ð/¨rÐ2ˆØ
�‰�2�d�V�ÔÜ�t“9ˆÜ" 4¨°:Ñ)=Ó>ˆØ�z A‘~Ò&à�G‰GŒIØò 7�Ø—‘©˜ š°2Õ6ñ7ð �H‰H�S˜J¨Ñ1°AÑ5Ñ6Ô7ÚØ—‘˜ ™
Ô#Ø# A B˜Kò ;�DØ—G‘G©T˜F TšM°rÕ:ñ;ð%;ð* ‡G�G„IØ‡G�GÐ$Ô%ò€Dð ò (‰
ˆˆdØ
�‰�"�T˜#�J˜a ˜vÐ&Õ'ð(à‡G�G„IØ‡G�G„Ià‡G�GÐ=Ô>Ø‡G�GÐ?Ô@Ø‡G�Gð	ôð "Ÿ™×+Ñ+¨J¸Ó;ò @ˆØ
�‰�˜}×4Ñ4Ñ4¸$ˆÕ?ñ@r   c                ó  — g }| j                   j                  «       }|rc|j                  d«       |D ]M  \  }}t        |dt	        |«      «      }|j
                  › d|j                  › d|› �}|j                  d|z   «       ŒO |S )Nzregistered third-party plugins:ri   ú-z at ry   )rb   Úlist_plugin_distinfor4   r    ÚreprÚproject_namer2   )rQ   Úlinesrk   ÚpluginÚdistÚlocÚcontents          r   rj   rj   þ   sˆ   € Ø€EØ×%Ñ%×:Ñ:Ó<€JÙØ�‰Ð6Ô7Ø&ò 	)‰LˆF�DÜ˜& *¬d°6«lÓ;ˆCØ×*Ñ*Ð+¨1¨T¯\©\¨N¸$¸s¸eÐDˆGØ�L‰L˜ ™Õ(ð	)ð €Lr   c                óð  — g }| j                   j                  s| j                   j                  r@|j                  dt        j
                  › �«       t        | «      }|r|j                  |«       | j                   j                  rq|j                  d«       | j                  j                  «       }|D ]A  \  }}t        |d«      r|j                  }nt        |«      }|j                  d|d›d|› �«       ŒC |S )Nzusing: pytest-zactive plugins:ri   z    z<20z: )rU   r;   Útraceconfigr4   rX   rY   rj   Úextendrb   Úlist_name_pluginÚhasattrri   r£   )rQ   r¥   ÚverinfoÚitemsr6   r¦   Úrs          r   Úpytest_report_headerr²   
  sÒ   € Ø€EØ‡}�}×Ò˜fŸm™m×7Ò7Ø�‰�~¤f×&8Ñ&8Ð%9Ð:Ô;ä& vÓ.ˆÙØ�L‰L˜Ô!à‡}�}× Ò Ø�‰Ð&Ô'Ø×$Ñ$×5Ñ5Ó7ˆØ!ò 	1‰LˆD�&Ü�v˜zÔ*Ø—O‘O‘ä˜“L�Ø�L‰L˜4  S˜z¨¨A¨3Ð/Õ0ð	1ð €Lr   )r!   r   r(   r)   )r(   zGenerator[None, Config, Config])rQ   r   r(   r)   )rQ   r   r(   zint | ExitCode | None)rQ   r   r(   z	list[str]) r-   Ú
__future__r   ÚargparseÚcollections.abcr   r   r_   rK   Útypingr   Ú_pytest.configr   r   r	   Ú_pytest.config.argparsingr
   r   r   Ú_pytest.terminalr   rX   ÚActionr   rB   Úhookimplrf   rm   rt   rr   rj   r²   © r   r   ú<module>r½      sˆ   ðá 9å "ã Ý %Ý $Û 	Û 
Ý å !Ý #Ý $Ý 4Ý 6Ý ,Ý -Û ô#�—‘ô #óL<ð~ €‡�˜Ôòó ðó@*óóE@óP	ôr   