관리-도구
편집 파일: clientlib.cpython-38.pyc
U ,�ek/ � @ s� d dl mZ d dlZd dlZd dlZd dlZd dlZd dlmZ d dlm Z d dlm Z d dlZd dlm Z d dlmZ d dlmZ d dlmZ d d lmZ e�d �Ze�ejej�ZdZedz�Zd dd�dd�Zd dd�dd�Z d dd�dd�Z!dddd�Z"d d d�dd�Z#G d d!� d!e �Z$G d"d#� d#e$�Z%e�&d$d%e�'d%ej�e�'d&ej�e�'d'ej�e�'d(e�(e��e�)d)ejd*�e�)d+ed*�e�)d,ed-�e�)d.e�*e�d/g�e�)d0e�*e�g �e�)d1e�*e�g �e�)d2e�*ej�g �e�)d3e�*ej�g �e�)d4ej+d5�e�)d6ej+d5�e�)d7ej+d8�e�)d9ejd*�e�)d:ejej,�e�)d;ejd*�e�)d<ejd=�e�)d>ej+d5�e%d?g �e�)d@ej+d5��Z-e�.e-�Z/G dAdB� dBe�Z0ej1ej2e/ee0dC�Z3dDZ4dEZ5G dFdG� dGej6�Z7G dHdI� dIej8�Z9G dJdK� dKej8�Z:d d dL�dMdN�Z;dOdOdPddQ�dRdS�Z<dOdOdPddQ�dTdU�Z=dVdWd+dXe�>ej?�� dY�fd'e;dZ�fffd[d\d+dXe�>ej?�� dY�fd'e;d]�fffd^d_d`d'e;d^�ffffZ@G dadb� dbej8�ZAej&d$d%e�'d%ej�e�'d%e�(eBdcdd� e@D ����e�)d(e�(deh�de�eAd'ejC�fdfdd� e@D �dgdd� e-jDD ��� ZEej&d$d%e�'d%ej�fdhdd� e-jDD �e$d?g �e9d+ej�e9d,ej�f�� ZFej&d{e-jDe9d+ej�e9d,ej�f�� ZGe�&didje�'djej�e�Hdke�.eF�dje�Ie4e5��e�Hdke�.eG�dje4�e�Hdke�.eE�dje5�e7dlejdje�Ie4e5�d8dm�e�Jdne=��ZKej&dode�Le�fdpdd� eD ��� ZMe�&dqde�Ndre�.eK��e�)dse�*e�(e��dg�e�OdteMi �e%due�e�)d+ed*�e�)d,ed-�e�)d6ej+d5�e�)d<e�eje!�d=�e�Jdve<�e:d+ej�e:d,ej�e�8dwe�PeQ���ZRG dxdy� dye�ZSej1ej2eReeSdC�ZTdS )|� )�annotationsN)�Any)� NamedTuple)�Sequence)�ALL_TAGS)�language_names)� FatalError)� yaml_loadZ pre_commit) z commit-msgz post-checkoutzpost-commitz post-mergezpost-rewrite� pre-commit�pre-merge-commit�pre-pushz pre-rebasezprepare-commit-msg�manual�str�None)�tag�returnc C s | t krt�d| �d���d S )Nz Type tag z; is not recognized. Try upgrading identify and pre-commit?)r �cfgv�ValidationError)r � r �B/opt/hc_python/lib/python3.8/site-packages/pre_commit/clientlib.py�check_type_tag( s �r ztuple[int, ...])�sr c C s t dd� | �d�D ��S )zpoor man's version comparisonc s s | ]}t |�V qd S �N)�int)�.0�pr r r � <genexpr>2 s z parse_version.<locals>.<genexpr>�.)�tuple�split)r r r r � parse_version0 s r )�versionr c C s0 t | �t tj�kr,t�d| � dtj� d���d S )Nzpre-commit version z is required but version z? is installed. Perhaps run `pip install --upgrade pre-commit`.)r �C�VERSIONr r )r! r r r �check_min_version5 s �r$ r r r )�commitzmerge-commit�push)�stager c C s t �| | �S r )�_STAGES�get)r'