관리-도구
편집 파일: dart.cpython-38.pyc
U ,�e( � @ s� d dl mZ d dlZd dlZd dlZd dlZd dlmZ d dlm Z d dl mZ d dlm Z d dlmZ d dlmZ d d lmZ d d lmZ d dlmZ dZejZejZejZd dd�dd�Zejdd dd�dd��Zdd ddd�dd�Z dS )� )�annotationsN)� Generator)�Sequence)� lang_base)� envcontext)�PatchesT)�Var)�Prefix)�win_exe)� yaml_loadZdartenv�strr )�venv�returnc C s dt j�| d�t jtd�fffS )N�PATH�bin)�os�path�join�pathsepr )r � r �G/opt/hc_python/lib/python3.8/site-packages/pre_commit/languages/dart.py� get_env_patch s �r r zGenerator[(None, None, None)])�prefix�versionr c c s0 t �| t|�}tt|��� d V W 5 Q R X d S )N)r �environment_dir�ENVIRONMENT_DIRr r )r r �envdirr r r �in_env s r z Sequence[str]�None)r r �additional_dependenciesr c s: t �d|� t �| t|�}tj�|d�� dddd�� fdd�}t�� � t� � �}|| |� W 5 Q R X |D ]�}t� � ��}|� d �\}} }|r�|d |f} n|f} t j| d| �tjd|i�d� t� |�D ]T\}} }d|kr�t� � �.} tj�| d�}t�||� |t|�|� W 5 Q R X �q*q�td|� ���W 5 Q R X qjd S )N�dartr r r r )�prefix_p� pub_cacher c s� t jd|i�}t| �d���}t|�}W 5 Q R X tj| d|d� |d D ]<}tj| dddd t j�� t|��| �d |� d��f|d� qHd S )N� PUB_CACHE�pubspec.yaml)r �pub�get��envZexecutablesr �compile�exez--outputr z.dart) r �environ�openr r r � setup_cmdr r )r! r"