• File: fix_annotations.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/lib/python2.7/site-packages/libpasteurize/fixes/fix_annotations.pyc
  • Date Modified: 01/24/2020 11:55 AM
  • File size: 2.14 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit

,]c@sbdZddlmZddlmZddlmZdZdZdej	fdYZ
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&eZeZdZdZdZRS(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|dkrdS|jt
jkrx|jD]A}|jt
j
kr|j|dt|jt|qqWn;|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