관리-도구
편집 파일: migrate_config.cpython-38.pyc
U ,�e3 � @ s� d dl mZ d dlZd dlZd dlZd dlZd dlmZ d dlm Z ddd�dd �Z ddd �dd�Zddd �d d�Zddd �dd�Z ddddd�dd�ZdS )� )�annotationsN)�InvalidConfigError)� yaml_load�str�bool)�line�returnc C s | � d�p| �� S )N)�#z---)� startswith�strip)r � r �P/opt/hc_python/lib/python3.8/site-packages/pre_commit/commands/migrate_config.py�_is_header_line s r )�contentsr c C s� t t| �t�r�| �d�}d}|t|�k r>t|| �r>|d7 }qd�|d |� �}d�||d � �}z|� d|� �}t|� |} W n, tjk r� |� dt � |d�� �} Y nX | S )NTr � � zrepos: z )� isinstancer �list� splitlines�lenr �join�yamlZ YAMLError�textwrap�indent)r �lines�i�header�restZtrial_contentsr r r �_migrate_map s r c C s t �dd| �S )Nz(\n\s+)sha:z\1rev:��re�sub�r r r r �_migrate_sha_to_rev) s r# c C s t �dd| �S )Nz(\n\s+)language: python_venv\bz\1language: pythonr r"