Spade

Mini Shell

Directory:~$ /proc/self/root/usr/lib/python2.7/site-packages/libpasteurize/fixes/
Upload File

[Home] [System Details] [Kill Me]
Current File:~$ //proc/self/root/usr/lib/python2.7/site-packages/libpasteurize/fixes/fix_annotations.pyc

�
,�]c@sbdZddlmZddlmZddlmZdZd�Zdej	fd��YZ
d	S(
u&
Fixer to remove function annotations
i����(t
fixer_base(ttoken(tsymsu)Removing function annotations
completely.cCs|jdS(Ni(tchildren(tnode((sG/usr/lib/python2.7/site-packages/libpasteurize/fixes/fix_annotations.pytparam_without_annotationsstFixAnnotationscBs&eZeZd�ZdZd�ZRS(cCs,|js(t|_|j|d|�ndS(Ntreason(twarnedtTruetwarning(tselfRR((sG/usr/lib/python2.7/site-packages/libpasteurize/fixes/fix_annotations.pyt	warn_onces		um
              funcdef< 'def' any parameters< '('
[params=any] ')' > ['->' ret=any] ':'
any* >
             
cCs+|jd�}|jd�}|dk	rx|jjtjksKtd��|j|dt�|jj	�|j	�n|dkr�dS|jt
jkr�x�|jD]A}|jt
j
kr�|j|dt�|jt|��q�q�Wn;|jt
j
kr'|j|dt�|jt|��ndS(uK
        This just strips annotations from the funcdef completely.
        uparamsuretuInvalid return
annotationRN(tgettNonetprev_siblingttypeRtRARROWtAssertionErrorRtwarning_texttremoveRt
typedargslistRttnametreplaceR(RRtresultstparamstrettparam((sG/usr/lib/python2.7/site-packages/libpasteurize/fixes/fix_annotations.pyt	transforms"!

(t__name__t
__module__tFalseRRtPATTERNR(((sG/usr/lib/python2.7/site-packages/libpasteurize/fixes/fix_annotations.pyRs	N(t__doc__tlib2to3Rt
lib2to3.pgen2Rtlib2to3.fixer_utilRRRtBaseFixR(((sG/usr/lib/python2.7/site-packages/libpasteurize/fixes/fix_annotations.pyt<module>s