https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/sphinx/pycode/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/sphinx/pycode/__pycache__/ast.cpython-310.pyc
o

�$�a��@s�UdZddlZddlmZmZmZmZmZejdkrddl	Z	nzddl
mZ	Wn
ey4ddl	Z	Ynwie	j
d�e	jd�e	jd�e	jd	�e	jd
�e	jd�e	jd�e	jd
�e	jd�e	jd�e	jd�e	jd�e	jd�e	jd�e	jd�e	jd�e	jd�e	jde	jdi�Z eee	j!e"fe#d<d'de"de"ddfdd�Z$ed(d dde"ddfd!d"��Z%ed(d e	j!de"de"fd#d"��Z%d(d ee	j!de"dee"fd$d"�Z%Gd%d&�d&e	j&�Z'dS))z�
    sphinx.pycode.ast
    ~~~~~~~~~~~~~~~~~

    Helpers for AST (Abstract Syntax Tree).

    :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�Dict�List�Optional�Type�overload���)�ast3�+�and�&�|�^�/z//�~z<<�@�*�%�not�**�orz>>�-�	OPERATORS�exec�code�mode�returnzast.ASTcCsRz	tj||dd�WStytj||d�YSty(tj||d�YSw)z{Parse the *code* using the built-in ast or typed_ast libraries.

    This enables "type_comments" feature if possible.
    T)r�
type_comments)r)�ast�parse�SyntaxError�	TypeError)rr�r#�3/usr/lib/python3/dist-packages/sphinx/pycode/ast.pyr /s�r ��nodecC�dS�Nr#�r&rr#r#r$�unparseA�r*cCr'r(r#r)r#r#r$r*Fr+cCs(|durdSt|t�r
|St|��|�S)zUnparse an AST to string.N)�
isinstance�str�_UnparseVisitor�visitr)r#r#r$r*Ks

c@s&eZdZd<deddfdd�Zdejdefdd	�ZeD]Z	ee
�d
�e	j�<qdejdefdd�Z
d
ejdeejdefdd�Zdejdefdd�Zdejdefdd�Zdejdefdd�Zdejdefdd�Zdejdefdd�Zdejdefdd�Zdejdefdd�Zdejdefdd �Zdej defd!d"�Z!dej"defd#d$�Z#dej$defd%d&�Z%dej&defd'd(�Z'dej(defd)d*�Z)dej*defd+d,�Z+dej,defd-d.�Z-e.j/d/k�r
dej0defd0d1�Z1dej2defd2d3�Z3dej4defd4d5�Z5dej6defd6d7�Z7dej8defd8d9�Z9d:d;�Z:dS)=r.r%rrNcCs
||_dSr()r)�selfrr#r#r$�__init__V�
z_UnparseVisitor.__init__r&cCs
t|jSr()r�	__class__�r0r&r#r#r$�	_visit_opYr2z_UnparseVisitor._visit_opzvisit_{}cCs"|jrd|j|�|j�fS|jS)Nz%s: %s)�
annotation�argr/r4r#r#r$�	visit_arg^sz_UnparseVisitor.visit_argr7�defaultcCs@|�|�}|r|jr|d|�|�7}|S|d|�|�7}|S)z&Unparse a single argument to a string.z = %sz=%s)r/r6)r0r7r9�namer#r#r$�_visit_arg_with_defaultds
�z'_UnparseVisitor._visit_arg_with_defaultc
	Cs�t|j�}t|j�}d}t|d�r|t|j�7}||7}tt|�|�D]}|�dd�q#t|j�}tt|�t|j	��D]}|�dd�q;g}t|d�rht
|j�D]\}}	|�|�|	||��qP|jrh|�d�t
|j�D]\}}	|�|�|	|||��qm|j
r�|�d|�|j
��|j	r�|j
s�|�d�t
|j	�D]\}}	|�|�|	||��q�|jr�|�d|�|j��d�|�S)Nr�posonlyargsrrr�, )�list�defaults�len�args�hasattrr<�range�insert�kw_defaults�
kwonlyargs�	enumerate�appendr;�varargr/�kwarg�join)
r0r&r?�positionalsr<�_rErA�ir7r#r#r$�visit_argumentsns8







z_UnparseVisitor.visit_argumentscCsd|�|j�|jfS)Nz%s.%s)r/�value�attrr4r#r#r$�visit_Attribute�sz_UnparseVisitor.visit_Attributecs$d��fdd�|j|j|jfD��S)N� c3��|]}��|�VqdSr(�r/��.0�e�r0r#r$�	<genexpr>���z._UnparseVisitor.visit_BinOp.<locals>.<genexpr>)rK�left�op�rightr4r#rYr$�visit_BinOp�s$z_UnparseVisitor.visit_BinOpcs*d��|j�}|��fdd�|jD��S)Nz %s c3rTr(rUrVrYr#r$rZ�r[z/_UnparseVisitor.visit_BoolOp.<locals>.<genexpr>)r/r]rK�values)r0r&r]r#rYr$�visit_BoolOp�sz_UnparseVisitor.visit_BoolOpcsB�fdd�|jD��fdd�|jD�}d��|j�d�|�fS)Ncsg|]}��|��qSr#rUrVrYr#r$�
<listcomp>�sz._UnparseVisitor.visit_Call.<locals>.<listcomp>cs"g|]
}d|j��|j�f�qS)z%s=%s)r7r/rP�rW�krYr#r$rb�s"z%s(%s)r=)rA�keywordsr/�funcrK)r0r&rAr#rYr$�
visit_Call�s�z_UnparseVisitor.visit_CallcCsR|jturdSt|jtttf�r$|jrtjdkrt	�
|j|�St|j�St|j�S)N�...r)rP�Ellipsisr,�int�float�complexr�sys�version_infor�get_source_segment�reprr4r#r#r$�visit_Constant�s


z_UnparseVisitor.visit_ConstantcsN�fdd�|jD�}�fdd�|jD�}dd�t||�D�}dd�|�dS)Nc3rTr(rUrcrYr#r$rZ�r[z-_UnparseVisitor.visit_Dict.<locals>.<genexpr>c3rTr(rU)rW�vrYr#r$rZ�r[css �|]\}}|d|VqdS)z: Nr#)rWrdrrr#r#r$rZ�s��{r=�})�keysr`�ziprK)r0r&rur`�itemsr#rYr$�
visit_Dict�sz_UnparseVisitor.visit_DictcCs|�|j�Sr()r/rPr4r#r#r$�visit_Index�sz_UnparseVisitor.visit_IndexcCsd|�|j�S)Nzlambda %s: ...)r/rAr4r#r#r$�visit_Lambda�sz_UnparseVisitor.visit_Lambdac�"dd��fdd�|jD��dS)N�[r=c3rTr(rUrVrYr#r$rZ�r[z-_UnparseVisitor.visit_List.<locals>.<genexpr>�]�rK�eltsr4r#rYr$�
visit_List��"z_UnparseVisitor.visit_ListcCs|jSr()�idr4r#r#r$�
visit_Name�sz_UnparseVisitor.visit_Namecr{)Nrsr=c3rTr(rUrVrYr#r$rZ�r[z,_UnparseVisitor.visit_Set.<locals>.<genexpr>rtr~r4r#rYr$�	visit_Set�r�z_UnparseVisitor.visit_Setcs�dtjdtfdd�}||j�r'd��fdd�|jjD��}d��|j�|fSt|jtj	�rM||jj�rMd��fd	d�|jjjD��}d��|j�|fSd��|j���|j�fS)
NrPrcSs,t|tj�ot|j�otdd�|jD��S)Ncss�|]	}t|tj�VqdSr()r,r�Starred)rW�eltr#r#r$rZ�s�zK_UnparseVisitor.visit_Subscript.<locals>.is_simple_tuple.<locals>.<genexpr>)r,r�Tuple�boolr�any)rPr#r#r$�is_simple_tuple�s
��z8_UnparseVisitor.visit_Subscript.<locals>.is_simple_tupler=c3rTr(rUrVrYr#r$rZ�r[z2_UnparseVisitor.visit_Subscript.<locals>.<genexpr>z%s[%s]c3rTr(rUrVrYr#r$rZ�r[)
r�ASTr��slicerKrr/rPr,�Index)r0r&r�rr#rYr$�visit_Subscript�s
z_UnparseVisitor.visit_SubscriptcCsd|�|j�|�|j�fS)Nz%s %s)r/r]�operandr4r#r#r$�
visit_UnaryOp�sz_UnparseVisitor.visit_UnaryOpcsVt|j�dkr	dSt|j�dkrd��|jd�Sdd��fdd�|jD��d	S)
Nrz()�z(%s,)�(r=c3rTr(rUrVrYr#r$rZ�r[z._UnparseVisitor.visit_Tuple.<locals>.<genexpr>�))r@rr/rKr4r#rYr$�visit_Tuple�s
"z_UnparseVisitor.visit_TuplercC�
t|j�Sr(�rp�sr4r#r#r$�visit_Bytes�r2z_UnparseVisitor.visit_BytescCsdS)Nrhr#r4r#r#r$�visit_Ellipsis�sz_UnparseVisitor.visit_EllipsiscCr�r()rprPr4r#r#r$�visit_NameConstant�r2z"_UnparseVisitor.visit_NameConstantcCr�r()rp�nr4r#r#r$�	visit_Num�r2z_UnparseVisitor.visit_NumcCr�r(r�r4r#r#r$�	visit_Str�r2z_UnparseVisitor.visit_StrcCstdt|�j��)NzUnable to parse %s object)�NotImplementedError�type�__name__r4r#r#r$�
generic_visit�sz_UnparseVisitor.generic_visit�r%);r��
__module__�__qualname__r-r1rr�r5r�_op�locals�formatr7r8rr;�	argumentsrO�	AttributerR�BinOpr_�BoolOpra�Callrg�Constantrqrrxr�ry�Lambdarzrr��Namer��Setr��	Subscriptr��UnaryOpr�r�r�rmrn�Bytesr�rir��NameConstantr��Numr��Strr�r�r#r#r#r$r.Us:
&r.)rr�)(�__doc__rm�typingrrrrrrnr�	typed_astr
�ImportError�Add�And�BitAnd�BitOr�BitXor�Div�FloorDiv�Invert�LShift�MatMult�Mult�Mod�Not�Pow�Or�RShift�Sub�UAdd�USubrr�r-�__annotations__r r*�NodeVisitorr.r#r#r#r$�<module>sn


���������	�
���
������"

https://t.me/RX1948 - 2025