§
    øyIf[
  ã                  ó„   — d Z ddlmZ ddlZddlmZ ddlmZ ddlm	Z	  G d„ de¦  «        Z
 G d	„ d
¦  «        Zdd„ZdZdS )z-Module declaring a command execution request.é    )ÚannotationsN)ÚEnum)ÚPath)ÚSequencec                  ó2   — e Zd ZdZdZdZedd„¦   «         ZdS )ÚStdinSourcer   é   é   Úreturnc                 ón   — t           j                             ¦   «         rt          j        nt          j        S )z@:return: ``USER`` if the standard input is tty type else ``OFF``)ÚsysÚstdinÚisattyr   ÚUSERÚOFF© ó    úG/var/www/piapp/venv/lib/python3.11/site-packages/tox/execute/request.pyÚ	user_onlyzStdinSource.user_only   s'   € õ $'¤9×#3Ò#3Ñ#5Ô#5ÐJ�{ÔÐ½;¼?ÐJr   N)r   r   )Ú__name__Ú
__module__Ú__qualname__r   r   ÚAPIÚstaticmethodr   r   r   r   r   r      sG   € € € € € Ø
€CØ€DØ
€CàðKð Kð Kñ „\ðKð Kð Kr   r   c                  ó>   — e Zd ZdZ	 ddd„Zedd„¦   «         Zdd„ZdS )ÚExecuteRequestz%Defines a commands execution request.NÚcmdúSequence[str | Path]Úcwdr   Úenvúdict[str, str]r   r   Úrun_idÚstrÚallowúlist[str] | Noner   ÚNonec                óÆ   — t          |¦  «        dk    rd}t          |¦  «        ‚d„ |D ¦   «         | _        || _        || _        || _        || _        |�d|v rd}|| _        dS )a$  
        Create a new execution request.

        :param cmd: the command to run
        :param cwd: the current working directory
        :param env: the environment variables
        :param stdin: the type of standard input allowed
        :param run_id: an id to identify this run
        r   zcannot execute an empty commandc                ó,   — g | ]}t          |¦  «        ‘ŒS r   ©r#   )Ú.0Úis     r   ú
<listcomp>z+ExecuteRequest.__init__.<locals>.<listcomp>.   s   € Ð3Ð3Ð3¨!�s 1™vœvÐ3Ð3Ð3r   NÚ*)ÚlenÚ
ValueErrorr   r   r    r   r"   r$   )Úselfr   r   r    r   r"   r$   Úmsgs           r   Ú__init__zExecuteRequest.__init__   ss   € õ$ ˆs‰8Œ8�qŠ=ˆ=Ø3ˆCÝ˜S‘/”/Ð!Ø3Ð3¨sÐ3Ñ3Ô3ˆŒØˆŒØˆŒØˆŒ
ØˆŒØÐ ¨  ØˆEØˆŒ
ˆ
ˆ
r   c                ó&  — 	 t          t          | j        d         ¦  «                             | j        ¦  «        ¦  «        }n# t
          $ r | j        d         }Y nw xY w|g}|                     | j        dd…         ¦  «         t          |¦  «        S )z.:return: the command to run as a shell commandr   r	   N)r#   r   r   Úrelative_tor   r/   ÚextendÚ	shell_cmd)r0   ÚexeÚ_cmds      r   r6   zExecuteRequest.shell_cmd7   s�   € ð	Ý•d˜4œ8 Aœ;Ñ'Ô'×3Ò3°D´HÑ=Ô=Ñ>Ô>ˆCˆCøÝð 	ð 	ð 	Ø”(˜1”+ˆCˆCˆCð	øøøàˆuˆØ�Š�D”H˜Q˜R˜R”LÑ!Ô!Ð!Ý˜‰ŒÐs   ‚?A ÁAÁAc                óP   — | j         j        › d| j        ›d| j        ›d| j        ›d�S )Nz(cmd=z, cwd=z, env=..., stdin=ú))Ú	__class__r   r   r   r   )r0   s    r   Ú__repr__zExecuteRequest.__repr__B   s6   € Ø”.Ô)ÐnÐn°´ÐnÐnÀ$Ä(ÐnÐnÐ_cÔ_iÐnÐnÐnÐnr   ©N)r   r   r   r   r    r!   r   r   r"   r#   r$   r%   r   r&   )r   r#   )r   r   r   Ú__doc__r2   Úpropertyr6   r<   r   r   r   r   r      sr   € € € € € Ø/Ð/ð #'ðð ð ð ð ð< ðð ð ñ „Xððoð oð oð oð oð or   r   r   úSequence[str]r   r#   c                óÂ   ‡— t           j        dk    r(ddlm}  |t	          d„ | D ¦   «         ¦  «        ¦  «        S ddlmŠ d                     ˆfd„| D ¦   «         ¦  «        S )NÚwin32r   )Úlist2cmdlinec              3  ó4   K  — | ]}t          |¦  «        V — Œd S r=   r)   )r*   Úxs     r   ú	<genexpr>zshell_cmd.<locals>.<genexpr>J   s(   è è € Ð!6Ð!6¨Q¥# a¡&¤&Ð!6Ð!6Ð!6Ð!6Ð!6Ð!6r   )Úquoteú c              3  óH   •K  — | ]} ‰t          |¦  «        ¦  «        V — Œd S r=   r)   )r*   rE   Úshlex_quotes     €r   rF   zshell_cmd.<locals>.<genexpr>N   s3   øè è € Ð5Ð5¨A�K�K¥ A¡¤Ñ'Ô'Ð5Ð5Ð5Ð5Ð5Ð5r   )r   ÚplatformÚ
subprocessrC   ÚtupleÚshlexrG   Újoin)r   rC   rJ   s     @r   r6   r6   F   s‚   ø€ Ý
„|�wÒÐØ+Ð+Ð+Ð+Ð+Ð+àˆ|�EÐ!6Ð!6°#Ð!6Ñ!6Ô!6Ñ6Ô6Ñ7Ô7Ð7à*Ð*Ð*Ð*Ð*Ð*à�8Š8Ð5Ð5Ð5Ð5°Ð5Ñ5Ô5Ñ5Ô5Ð5r   )r   r   r6   )r   r@   r   r#   )r>   Ú
__future__r   r   Úenumr   Úpathlibr   Útypingr   r   r   r6   Ú__all__r   r   r   ú<module>rU      sÞ   ðØ 3Ð 3à "Ð "Ð "Ð "Ð "Ð "à 
€
€
€
Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð ðKð Kð Kð Kð K�$ñ Kô Kð Kð-oð -oð -oð -oð -oñ -oô -oð -oð`6ð 6ð 6ð 6ð€€€r   