관리-도구
편집 파일: python.cpython-311.pyc
� �܋f� � �8 � d Z ddlmZ ddlZddlZddlZddlmZm Z m Z mZmZ ddl mZ ddlmZmZ ddlmZmZmZ ddlmZmZmZ dd lmZ dd lmZmZ ddlm Z ddl!m"Z"m#Z#m$Z$m%Z% erdd l m&Z& ee� � Zdd�Z'dd�Z(dd�Z)dd�Z*dd�Z+ G d� de � � Z,dS ) z'Python source expertise for coverage.py� )�annotationsN)�Dict�Iterable�Optional�Set� TYPE_CHECKING)�env)�CoverageException�NoSource)�canonical_filename�relative_filename�zip_location)� expensive�isolate_module� join_regex)�PythonParser)�source_token_lines�source_encoding)�FileReporter)�TArc�TLineNo�TMorf�TSourceTokenLines)�Coverage�filename�str�return�bytesc �� � t | d� � 5 }|� � � }ddd� � n# 1 swxY w Y |� dd� � � dd� � S )zFRead the Python source text from `filename`. Returns bytes. �rbNs � � )�open�read�replace)r �f�sources �b/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/coverage/python.py�read_python_sourcer) s� � � �h�� � � ��������� � � � � � � � � � ���� � � � � �>�>�'�5�)�)�1�1�%��?�?�?s �2�6�6c �� � t j � | � � \ }}|dk rt j rddg}n|g}|D ]J}||z }t j � |� � rt |� � } n't |� � }|� n�Kt d| � d�� � �|� dd� � }|� t |� � d� � }|r|d d k r|d z }|S )z#Return the source code, as unicode.�.pyz.pywNzNo source for code: 'z'.� � r% ���� )�os�path�splitextr �WINDOWS�existsr) � get_zip_bytesr r% �decoder )r �base�ext�exts�try_filename�source_bytesr'