Ë
    æØjj#'  ã                  ó"  — 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Z G d„ dej(                  «      Zdd„Z ej.                  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)Ú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       €úT/opt/eval-harness/bench_task/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__.   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)r1   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.)r1   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.)r1   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.)r1   r   r   r   r5   r   z-oz--override-iniÚoverride_inizhOverride configuration option with "option=value" style, e.g. `-o strict_xfail=True -o cache_dir=cache`.)r   r1   r   )ÚgetgroupÚ	addoptionÚ
_addoptionr   )r   Úgroups     r   Úpytest_addoptionr@   ;   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 rF   )ÚcloseÚsysÚstderrÚwriter4   Ú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'   )Úoptionr9   ÚopenrK   ÚformatÚpytestÚ__version__ÚjoinÚmapr$   rI   Úversion_infoÚinvocation_paramsÚdirÚosÚgetcwdÚargsrL   rM   rN   ÚpluginmanagerÚenable_tracingrJ   Úadd_cleanup)ÚpathrR   rO   rP   rQ   s     @@@r   Úpytest_cmdline_parserd   z   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 rF   N)rI   ÚstdoutrK   rV   rW   Ú__file__Úgetpluginversioninfo)rO   Ú
plugininfoÚlines      r   Úshow_version_verboserk   ›   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é   )	rS   r0   rk   r   ÚOKr   Ú_do_configureÚshowhelpÚ_ensure_unconfigure)rO   s    r   Úpytest_cmdline_mainrr   ¦   sb   € ð ‡}�}×Ñ˜qÒ Ü˜VÔ$Ü�{‰{ÐØ	�‰×	Ò	Ø×ÑÔÜ�ÔØ×"Ñ"Ô$Ü�{‰{ÐØr   c                óB  — dd l }| 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|	› d�}|j	                  d	|› �«       t        |«      }||d
z
  kD  r?|j                  «        |j                  ||||d¬«      }|D ]  }|j                  |«       Œ ŒŸ|j	                  d||z
  dz
  z  «       |j                  |||z
  d¬«      }|sŒÓ|j                  |d   «       |dd  D ]  }|j                  ||z   «       Œ �Œ |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 )Nr   Ú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):ú  é   F)Úinitial_indentÚsubsequent_indentÚbreak_on_hyphensé   )r{   rm   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)Útextwrapr`   Ú
get_pluginÚ_twrK   Ú_parserÚ	optparserÚformat_helprj   Ú	fullwidthÚ_inidictÚ	TypeErrorÚlenÚwrapÚstatsÚgetÚmessage)rO   rˆ   ÚreporterÚtwÚcolumnsÚ
indent_lenÚindentr4   r   ÚtypeÚ_defaultÚspecÚspec_lenÚ	helplinesrj   ÚwrappedÚvarsÚwarningreports                     r   rp   rp   ´   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�d�V�ÔÜ�t“9ˆØ�z A‘~Ò&à�G‰GŒIØ Ÿ™ØØØ%Ø"(Ø!&ð &ó ˆIð "ò �Ø—‘˜•ñð �H‰H�S˜J¨Ñ1°AÑ5Ñ6Ô7Ø—m‘m D¨'°JÑ*>ÐQV�mÓWˆGâØ—‘˜ ™
Ô#Ø# A B˜Kò +�DØ—G‘G˜F T™MÕ*ò+ð7+ð< ‡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:rg   ú-z at rw   )r`   Úlist_plugin_distinfor2   r   ÚreprÚproject_namer0   )rO   Úlinesri   ÚpluginÚdistÚlocÚcontents          r   rh   rh     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:rg   z    z<20z: )rS   r9   Útraceconfigr2   rV   rW   rh   Úextendr`   Úlist_name_pluginÚhasattrrg   r¦   )rO   r¨   ÚverinfoÚitemsr4   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])rO   r   r&   r'   )rO   r   r&   zint | ExitCode | None)rO   r   r&   z	list[str])r+   Ú
__future__r   ÚargparseÚcollections.abcr   r   r]   rI   Útypingr   Ú_pytest.configr   r   r	   Ú_pytest.config.argparsingr
   Ú_pytest.terminalr   rV   ÚActionr   r@   Úhookimplrd   rk   rr   rp   rh   rµ   © r   r   ú<module>rÀ      s‚   ðá 9å "ã Ý %Ý $Û 	Û 
Ý å !Ý #Ý $Ý ,Ý -Û ô#�—‘ô #óL<ð~ €‡�˜Ôòó ðó@*óóP@óf	ôr   