o
    Wi                     @  sl   d dl mZ d dlmZ d dlmZ ddlmZ er,d dlmZ d dlm	Z	 ddlm
Z
 dddZdgZdS )    )annotations)suppress)TYPE_CHECKING   )convert)Mapping)Any)TypeDatakeystras_typer	   envMapping[str, str]returntuple[Any, str] | Nonec                 C  sj   d|    }||r3|| }tt d| }t|||}||fW  d   S 1 s.w   Y  dS )zGet the environment variable option.

    :param key: the config key requested
    :param as_type: the type we would like to convert it to
    :param env: environment variables to use

    :returns: the converted value and source, or None if not set

    VIRTUALENV_zenv var N)uppergetr   	Exceptionr   )r
   r   r   environ_keyvaluesource r   M/home/ubuntu/.local/lib/python3.10/site-packages/virtualenv/config/env_var.pyget_env_var   s   



 r   N)r
   r   r   r	   r   r   r   r   )
__future__r   
contextlibr   typingr   r   collections.abcr   r   r	   r   __all__r   r   r   r   <module>   s    
