1j 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 ZddZ'ddZ(ddZ)ddZ*ddZ+ G d de Z,dS ) z'Python source expertise for coverage.py )annotationsN)DictIterableOptionalSet TYPE_CHECKING)env)CoverageExceptionNoSource)canonical_filenamerelative_filenamezip_location) expensiveisolate_module join_regex)PythonParser)source_token_linessource_encoding)FileReporter)TArcTLineNoTMorfTSourceTokenLines)Coveragefilenamestrreturnbytesc t | d 5 }| }ddd n# 1 swxY w Y | dd dd S )zFRead the Python source text from `filename`. Returns bytes. rbNs )openreadreplace)r fsources c/builddir/build/BUILD/cloudlinux-venv-1.0.11/venv/lib64/python3.11/site-packages/coverage/python.pyread_python_sourcer) s h >>'5))11%???s 266c t j | \ }}|dk rt j rddg}n|g}|D ]J}||z }t j | rt | } n't | }| nKt 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% )ospathsplitextr WINDOWSexistsr) get_zip_bytesr r% decoder )r baseextextstry_filenamesource_bytesr' s r( get_python_sourcer<