§
{<ˆj- ã ó^ — d Z ddlmZ ddlmZ ddlmZ dZd„ Z G d„ dej ¦ « Z
d S )
z&
Fixer to remove function annotations
é )Ú
fixer_base)Útoken)Úsymsz)Removing function annotations completely.c ó — | j d S )Nr )Úchildren)Únodes úu/builddir/build/BUILD/cloudlinux-venv-1.0.12/venv/lib/python3.11/site-packages/libpasteurize/fixes/fix_annotations.pyÚparam_without_annotationsr
s € ØŒ=˜ÔÐó c ó" — e Zd ZdZd„ ZdZd„ ZdS )ÚFixAnnotationsFc óT — | j s d| _ | ||¬¦ « d S d S )NT©Úreason)ÚwarnedÚwarning)Úselfr r s r Ú warn_oncezFixAnnotations.warn_once s9 € ØŒ{ð .؈DŒKØ�LŠL˜ fˆLÑ-Ô-Ð-Ð-Ð-ð .ð .r zm
funcdef< 'def' any parameters< '(' [params=any] ')' > ['->' ret=any] ':' any* >
c óÒ — | d¦ « }| d¦ « }|�m|j j t j k s
J d¦ « ‚| |t ¬¦ « |j ¦ « | ¦ « |€dS |j t j k r_|j
D ]U}|j t j k r>| |t ¬¦ « | t |¦ « ¦ « ŒVdS |j t j k r@| |t ¬¦ « | t |¦ « ¦ « dS dS )zK
This just strips annotations from the funcdef completely.
ÚparamsÚretNzInvalid return annotationr )ÚgetÚprev_siblingÚtyper ÚRARROWr Úwarning_textÚremover Ú
typedargslistr ÚtnameÚreplacer
)r r Úresultsr r Úparams r Ú transformzFixAnnotations.transform sN € ð —’˜YÑ'Ô'ˆØ�kŠk˜&Ñ!Ô!ˆØˆ?ØÔ#Ô(E¬LÒ8Ð8Ð8Ð:VÑ8Ô8Ð8Ø�NŠN˜4ˆNÑ5Ô5Ð5ØÔ×#Ò#Ñ%Ô%Ð%Ø�JŠJ‰LŒLˆL؈>˜6˜6ØŒ;�$Ô,Ò,Ð,àœð
Dð
D�Ø”:¥¤Ò+Ð+Ø—N’N 4µ�NÑ=Ô=Ð=Ø—M’MÕ";¸EÑ"BÔ"BÑCÔCÐCøð
Dð
Dð Œ[�DœJÒ
&Ð
&à�NŠN˜4ˆNÑ5Ô5Ð5Ø�NŠNÕ4°VÑ<Ô<Ñ=Ô=Ð=Ð=Ð=ð 'Ð
&r N)Ú__name__Ú
__module__Ú__qualname__r r ÚPATTERNr# © r r r
r
s> € € € € € à
€Fð.ð .ð .ð
€Gð>ð >ð >ð >ð >r r
N)Ú__doc__Úlib2to3r Ú
lib2to3.pgen2r Úlib2to3.fixer_utilr r r
ÚBaseFixr
r( r r ú