U
    d/e                     @   s  U d Z ddlZddlZddlZddlZejdk Zejed< erVddl	Z
e
jjddZnddlmZ eZdddd	Ze dkstd
e dkrddlZejddd	Zejeejf ejeejf dddZe dkrejdk rejeejf edddZdS )z;Python 3.7 to 3.8 compatibility and platform compatibility.    N)   	   Literal)name)r   )returnc                   C   s   dS )z=Return None for startupinfo argument of ``subprocess.Popen``.N r   r   r   4/tmp/pip-unpacked-wheel-n8ok7rre/graphviz/_compat.pyget_startupinfo   s    r	   z%get_startupinfo() defaults to a no-opWindowsc                  C   s$   t  } |  jt jO  _t j| _| S )zAReturn subprocess.STARTUPINFO instance hiding the console window.)
subprocessSTARTUPINFOZdwFlagsZSTARTF_USESHOWWINDOWZSW_HIDEZwShowWindow)startupinfor   r   r   r	   $   s    )argr   c                 C   s   | S )z1Return subprocess argument as is (default no-op).r   r   r   r   r   make_subprocess_arg,   s    r   )r      c                 C   s
   t | S )z?Workaround https://bugs.python.org/issue41649 (not backported).)osfspathr   r   r   r   r   2   s    )__doc__r   platformsystypingversion_infoZPY38Any__annotations__Zunittest.mockZunittestZmockZ	MagicMockr   r	   AssertionErrorsystemr   r   UnionstrPathLiker   r   r   r   r   <module>   s&   

(