관리-도구
편집 파일: gc.cpython-38.pyc
U ,�e� � @ s� d dl mZ d dlZd dlmZ d dlmZ d dl m Z d dlmZ d dlm Z d dlmZ d dlmZ d d lmZ d d lmZ d dlmZ dd dddd�dd�Zddd�dd�Zddd�dd�ZdS )� )�annotationsN)�Any)�output)�InvalidConfigError)�InvalidManifestError)�load_config)� load_manifest)�LOCAL)�META)�Storer zdict[tuple[str, str], str]zset[tuple[str, str]]zdict[str, Any]�None)�store� all_repos�unused_repos�repo�returnc C s |d t krd S |d tkrR|d D ]*}|�d�}|�| �|d |�tjf� q$n�|d |d f}|�|�}|d krxd S zttj � |tj��}W n tk r� Y d S X |�|� dd� |D �} |d D ]H}|d | kr�q�|�d| |d d �}|�| �|d |�|d f� q�d S )Nr �hooksZadditional_dependencies�revc S s i | ]}|d |�qS )�id� )�.0�hookr r �D/opt/hc_python/lib/python3.8/site-packages/pre_commit/commands/gc.py� <dictcomp>, s z$_mark_used_repos.<locals>.<dictcomp>r ) r r �get�discard�db_repo_name�CZLOCAL_REPO_VERSIONr �os�path�joinZ MANIFEST_FILEr ) r r r r r �deps�keyr �manifestZby_idr r r �_mark_used_repos s<