
    9i-                     `    S r SSKJr  SSKJr  SSKJr  SrS r " S S\R                  5      r
g	)
z&
Fixer to remove function annotations
    )
fixer_base)token)symsz)Removing function annotations completely.c                      U R                   S   $ )Nr   )children)nodes    c/var/www/html/land-doc-ocr/venv/lib/python3.13/site-packages/libpasteurize/fixes/fix_annotations.pyparam_without_annotationsr
      s    ==    c                   (    \ rS rSrSrS rSrS rSrg)FixAnnotations   Fc                 T    U R                   (       d  SU l         U R                  XS9  g g )NTreason)warnedwarning)selfr   r   s      r	   	warn_onceFixAnnotations.warn_once   s#    {{DKLLL- r   zm
              funcdef< 'def' any parameters< '(' [params=any] ')' > ['->' ret=any] ':' any* >
              c                    UR                  S5      nUR                  S5      nUbm  UR                  R                  [        R                  :X  d   S5       eU R                  U[        S9  UR                  R                  5         UR                  5         Uc  gUR                  [        R                  :X  ab  UR                   HQ  nUR                  [        R                  :X  d  M#  U R                  U[        S9  UR                  [        U5      5        MS     gUR                  [        R                  :X  a/  U R                  U[        S9  UR                  [        U5      5        gg)z;
This just strips annotations from the funcdef completely.
paramsretNzInvalid return annotationr   )getprev_siblingtyper   RARROWr   warning_textremover   typedargslistr   tnamereplacer
   )r   r   resultsr   r   params         r	   	transformFixAnnotations.transform   s    Y'kk&!?##((ELL8V:VV8NN4N5##%JJL>6;;$,,,::+NN4N=MM";E"BC ) [[DJJ&NN4N5NN4V<= 'r   )r   N)	__name__
__module____qualname____firstlineno__r   r   PATTERNr%   __static_attributes__ r   r	   r   r      s    F.
G>r   r   N)__doc__lib2to3r   lib2to3.pgen2r   lib2to3.fixer_utilr   r   r
   BaseFixr   r-   r   r	   <module>r3      s1      #;">Z'' ">r   