관리-도구
편집 파일: identify.cpython-38.pyc
U *�e� � @ s� d dl mZ d dlZd dlZd dlZd dlZd dlZd dlZd dl Z d dl Z d dlmZ d dl mZ d dl mZ d dlmZ ee j�ZdZdZd Zd ZdZdZd ZdZeeeeef�Zeeef�Zeeef�Zeee�Zej ej!�"� � ej ej#�"� � ej ej$�"� � ej ej%�"� � ee�Z&ddd�dd�Z'ddd�dd�Z(ddd�dd�Z)ddd�dd�Z*ddd�dd�Z+dd d!�d"d#�Z,dd$d$d%�d&d'�Z-dd$d�d(d)�Z.dd$d�d*d+�Z/e�0d,ej1ej2B �Z3e�0d-�Z4ddd.�d/d0�Z5dd1d2�d3d4�Z6dS )5� )�annotationsN)�IO)� extensions)�interpreters)�licenses� directory�symlink�socket�file� executableznon-executable�text�binary�strzset[str])�path�returnc C s> zt �| �}W n& ttfk r4 t| � d���Y nX |j}t�|�rLthS t�|�r\t hS t� |�rlthS th}t � | t j�}|r�|�t� n |�t� tt j�| ��}t|�dkr�|�|� n*|r�t| �}t|�dkr�|�t|d �� t|@ �st| ��r|�t� n |�t� t|@ �s(t|��t|@ �s:t|��|S )N� does not exist.r )�os�lstat�OSError� ValueError�st_mode�stat�S_ISDIR� DIRECTORY�S_ISLNK�SYMLINK�S_ISSOCK�SOCKET�FILE�access�X_OK�add� EXECUTABLE�NON_EXECUTABLE�tags_from_filenamer �basename�len�update�parse_shebang_from_file�tags_from_interpreter� ENCODING_TAGS�file_is_text�TEXT�BINARY�AssertionError� MODE_TAGS)r �sr�mode�tagsr �t�shebang� r5 �?/opt/hc_python/lib/python3.8/site-packages/identify/identify.py�tags_from_path( s<