HEX
Server: LiteSpeed
System: Linux baran.dnsprotection.me 4.18.0-553.83.1.lve.el8.x86_64 #1 SMP Wed Nov 12 10:04:12 UTC 2025 x86_64
User: ddir12 (3618)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //lib/python3.6/site-packages/libpasteurize/fixes/__pycache__/fix_annotations.cpython-36.pyc
3

�c-�@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�%/usr/lib/python3.6/fix_annotations.py�param_without_annotationssr	c@s$eZdZdZdd�ZdZdd�ZdS)�FixAnnotationsFcCs|jsd|_|j||d�dS)NT)�reason)�warnedZwarning)�selfrrrrr�	warn_onceszFixAnnotations.warn_oncezm
              funcdef< 'def' any parameters< '(' [params=any] ')' > ['->' ret=any] ':' any* >
              cCs�|jd�}|jd�}|dk	rR|jjtjks2td��|j|td�|jj�|j�|dkr^dS|jt	j
kr�x`|jD],}|jt	jkrr|j|td�|j
t|��qrWn(|jt	jkr�|j|td�|j
t|��dS)zK
        This just strips annotations from the funcdef completely.
        �params�retNzInvalid return annotation)r)�getZprev_sibling�typer�RARROW�AssertionErrorr�warning_text�removerZ
typedargslistrZtname�replacer	)r
r�resultsrrZparamrrr�	transforms"


zFixAnnotations.transformN)�__name__�
__module__�__qualname__rrZPATTERNrrrrrr
sr
N)�__doc__Zlib2to3rZ
lib2to3.pgen2rZlib2to3.fixer_utilrrr	ZBaseFixr
rrrr�<module>s