
    Je                     $    d Z ddlZddZd Zd Zy)z:Spyder completion plugin auxiliar decorators (Sourcecode).    Nc                       t        j                  t              S t        j                          fd       }|S )zECall function req and then emit its results to the completion server.)methodrequires_responsec                 d     | g|i |}|!| j                   r| j                  |       y y y N)completions_availableemit_request)selfargskwargsparamsr   reqr   s       F/usr/lib/python3/dist-packages/spyder/plugins/completion/decorators.pywrapperzrequest.<locals>.wrapper   s@    T+D+F+$"<"<ff.?@ #=    )	functoolspartialrequestwraps)r   r   r   r   s   ``` r   r   r      sJ    
{  3DF 	F __SA A Nr   c                     i | _         t        |       D ]B  }t        | |      }t        |d      s| j                   j	                  |j
                  |i       D | S )zCClass decorator that maps completion method names to class methods._handle)handler_registrydirgetattrhasattrupdater   )clsmethod_namer   s      r   class_registerr      sY    C3x Gk*69%  ''(EFG Jr   c                       fd}|S )z5Assign an completion method name to a python handler.c                     | _         | S r   )r   )funcr   s    r   r   zhandles.<locals>.wrapper&   s    "r    )r   r   s   ` r   handlesr$   $   s     Nr   )NNT)__doc__r   r   r   r$   r#   r   r   <module>r&      s    A r   