
    G@dC                        d Z ddlmZmZmZmZ ddlmZmZm	Z	m
Z
 ddlmZ g dZ G d d          Zi ej        dej        d	ej        d
ej        dej        dej        dej        dej        dej        dej        dej        dej        dej        dej        dej        dej        dej        dej         dej!        dej"        dej#        dej$        dej%        dej&        dej'        d ej(        d!ej)        d"ej*        d#iZ+ G d$ d%          Z, G d& d'          Z- G d( d)          Z.d*d*e,j/        e,j0        e,j1        ge.j2        d+d,d*id,d*id,d*id*d-d. ej3        4                                D             id/d*d*d0Z5d*d*d*d*d1d*d*d2gd3d4d*d2gd5d*d6d2gid7d,d*id,d*id,d*id,d*id,d*id,d*id,d*id,d*id,d*id,d*id,d*id8Z6e5e6d9Z7 G d: d;          Z8d<d*iZ9d*e8j:        d=d=e9d>Z;d=g d?Z<d@g iZ=dAd=iZ>dBg dCZ?dAd=iZ@dDg iZAdEd=d=dFiZBi dGe;dHd=dIe<dJe=dKd=dLd=dMd=dNd=dOd=dPd=dQe>dRd=dSd=dTe?dUd=dVe@dWeAeBdBdXZC G dY dZ          ZD G d[ d\          ZE G d] d^          ZF G d_ d`          ZG G da db          ZH G dc dd          ZI G de df          ZJ G dg dh          ZKdiZL G dj dke          ZM G dl dmeeM          ZNdBS )na"  
General Spyder completion API constants and enumerations.

The constants and enums presented on this file correspond to a superset of
those used by the Language Server Protocol (LSP), available at:
https://microsoft.github.io/language-server-protocol/specifications/specification-current/
    )AnyOptionalTupleUnion)SignalQObjectSlotQt)SpyderConfigurationObserver)BashzC#CppzCSS/LESS/SASSGoGraphQLGroovyElixirErlangFortranHaxeHTMLJava
JavaScriptJSONJuliaKotlinOCamlPHPRRustScalaSwift
TypeScriptc                       e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdS )
SymbolKindzLSP workspace symbol constants.                        	   
                                                         N) __name__
__module____qualname____doc__FILEMODULE	NAMESPACEPACKAGECLASSMETHODPROPERTYFIELDCONSTRUCTORENUM	INTERFACEFUNCTIONVARIABLECONSTANTSTRINGNUMBERBOOLEANARRAYOBJECTKEYNULLENUM_MEMBERSTRUCTEVENTOPERATORTYPE_PARAMETERBLOCK_COMMENTCELL     =lib/python3.11/site-packages/spyder/plugins/completion/api.pyr#   r#   #   s        ))DFIGEFHEKDIHHHFFGEF
CDKFEHN MDDDra   r#   filemodule	namespacepackageclassmethodpropertyfieldconstructorenum	interfacefunctionvariableconstantstringnumberbooleanarrayobjectkeynullenum_memberstructeventoperatortype_parameterblockcommentcellc                       e Zd ZdZdZdZdZdS )ResourceOperationKindz"LSP workspace resource operations.createrenamedeleteN)r@   rA   rB   rC   CREATERENAMEDELETEr`   ra   rb   r   r   i   s#        ,,FFFFFra   r   c                       e Zd ZdZdZdZdS )FileChangeTyper$   r%   r&   N)r@   rA   rB   CREATEDCHANGEDDELETEDr`   ra   rb   r   r   s   s        GGGGGra   r   c                   "    e Zd ZdZdZdZdZdZdS )FailureHandlingKindz'LSP workspace modification error codes.aborttransactionalundotextOnlyTransactionalN)r@   rA   rB   rC   ABORTTRANSACTIONALUNDOTEXT_ONLY_TRANSACTIONALr`   ra   rb   r   r   y   s/        11 E#MD 6ra   r   T)documentChangesresourceOperationsfailureHandlingdynamicRegistrationvalueSetc                 <    g | ]}t          |t                    |S r`   )
isinstanceint).0values     rb   
<listcomp>r      s6     4 4 45&uc224 4 4 4ra   )r   
symbolKind)	applyEditworkspaceEditdidChangeConfigurationdidChangeWatchedFilessymbolexecuteCommandworkspaceFoldersconfiguration)r   willSavewillSaveWaitUntildidSave	plaintext)snippetSupportdocumentationFormat)r   completionItem)r   contentFormatr   )r   signatureInformation)synchronization
completionhoversignatureHelp
referencesdocumentHighlightdocumentSymbol
formattingrangeFormattingonTypeFormatting
definition
codeActioncodeLensdocumentLinkr   )	workspacetextDocumentc                       e Zd ZdZdZdZdZdS )TextDocumentSyncKindz=Text document synchronization modes supported by a lsp-serverr   r$   r%   N)r@   rA   rB   rC   NONEFULLINCREMENTALr`   ra   rb   r   r   y  s#        GGDDKKKra   r   includeTextF)	openClosechanger   r   save)resolveProvidertriggerCharactersr   r   N)firstTriggerCharactermoreTriggerCharactercommandsr   )	supportedchangeNotificationstextDocumentSynchoverProvidercompletionProvidersignatureHelpProviderdefinitionProviderreferencesProviderdocumentHighlightProviderdocumentSymbolProviderworkspaceSymbolProvidercodeActionProvidercodeLensProviderdocumentFormattingProviderdocumentRangeFormattingProvider documentOnTypeFormattingProviderrenameProviderdocumentLinkProviderexecuteCommandProvider)r   experimentalc                   "    e Zd ZdZdZdZdZdZdS )LSPEventTypesz%Language Server Protocol event types.r   r   windowr   N)r@   rA   rB   rC   DOCUMENT	WORKSPACEWINDOW	CODE_LENSr`   ra   rb   r   r     s(        //HIFIIIra   r   c                       e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!d Z"d!Z#d"Z$d#Z%d$Z&d%Z'd&Z(d'Z)d(Z*d)Z+d*Z,d+Z-d,Z.d-Z/d.Z0d/S )0CompletionRequestTypesz0Language Server Protocol request/response types.
initializeinitializedshutdownexitz$/cancelRequestzwindow/showMessagezwindow/showMessageRequestzwindow/logMessageztelemetry/eventzclient/registerCapabilityzclient/unregisterCapabilityzworkspace/workspaceFoldersz#workspace/didChangeWorkspaceFolderszworkspace/configurationz workspace/didChangeConfigurationzworkspace/didChangeWatchedFileszworkspace/symbolzworkspace/executeCommandzworkspace/applyEditztextDocument/publishDiagnosticsztextDocument/didOpenztextDocument/didChangeztextDocument/willSaveztextDocument/willSaveWaitUntilztextDocument/didSaveztextDocument/didCloseztextDocument/completionzcompletionItem/resolveztextDocument/hoverztextDocument/signatureHelpz textDocument/referencesztextDocument/documentHighlightztextDocument/documentSymbolztextDocument/formattingztextDocument/foldingRangeztextDocument/rangeFormattingztextDocument/onTypeFormattingztextDocument/definitionztextDocument/codeActionztextDocument/codeLenszcodeLens/resolveztextDocument/documentLinkzdocumentLink/resolveztextDocument/renameztextDocument/cursorEventN)1r@   rA   rB   rC   
INITIALIZEINITIALIZEDSHUTDOWNEXITCANCEL_REQUESTWINDOW_SHOW_MESSAGEWINDOW_SHOW_MESSAGE_REQUESTWINDOW_LOG_MESSAGETELEMETRY_EVENTCLIENT_REGISTER_CAPABILITYCLIENT_UNREGISTER_CAPABILITYWORKSPACE_FOLDERSWORKSPACE_FOLDERS_CHANGEWORKSPACE_CONFIGURATIONWORKSPACE_CONFIGURATION_CHANGEWORKSPACE_WATCHED_FILES_UPDATEWORKSPACE_SYMBOLWORKSPACE_EXECUTE_COMMANDWORKSPACE_APPLY_EDITDOCUMENT_PUBLISH_DIAGNOSTICSDOCUMENT_DID_OPENDOCUMENT_DID_CHANGEDOCUMENT_WILL_SAVEDOCUMENT_WILL_SAVE_UNTILDOCUMENT_DID_SAVEDOCUMENT_DID_CLOSEDOCUMENT_COMPLETIONCOMPLETION_RESOLVEDOCUMENT_HOVERDOCUMENT_SIGNATUREDOCUMENT_REFERENCESDOCUMENT_HIGHLIGHTDOCUMENT_SYMBOLDOCUMENT_FORMATTINGDOCUMENT_FOLDING_RANGEDOCUMENT_RANGE_FORMATTINGDOCUMENT_ON_TYPE_FORMATTINGDOCUMENT_DEFINITIONDOCUMENT_CODE_ACTIONDOCUMENT_CODE_LENSCODE_LENS_RESOLVEDOCUMENT_LINKSDOCUMENT_LINK_RESOLVEDOCUMENT_RENAMEDOCUMENT_CURSOR_EVENTr`   ra   rb   r   r   "  s       ::JKHD&N."=,'O!<#@ 4D7%G"%F") :0#D .20?.031)N5493O38 >"A340*0N2+O6ra   r   c                   "    e Zd ZdZdZdZdZdZdS )DiagnosticSeverityzLSP diagnostic severity levels.r$   r%   r&   r'   N)r@   rA   rB   rC   ERRORWARNINGINFORMATIONHINTr`   ra   rb   r   r   [  s(        ))EGKDDDra   r   c                   Z    e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZdZdZdZdZdZdZdZdZdS )CompletionItemKindz"LSP completion element categories.r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   N)r@   rA   rB   rC   TEXTrI   rO   rL   rK   rP   rH   rN   rE   rJ   UNITVALUErM   KEYWORDSNIPPETCOLORrD   	REFERENCEr`   ra   rb   r&  r&  e  sn        ,,DFHKEHEIFHDEDGGEDIIIra   r&  c                       e Zd ZdZdZdZdS )InsertTextFormatz$LSP completion text interpretations.r$   r%   N)r@   rA   rB   rC   
PLAIN_TEXTr+  r`   ra   rb   r/  r/  {  s        ..JGGGra   r/  c                       e Zd ZdZdZdZdZdS )TextDocumentSaveReasonz'LSP text document saving action causes.r$   r%   r&   N)r@   rA   rB   rC   MANUALAFTER_DELAY	FOCUS_OUTr`   ra   rb   r2  r2    s#        11FKIIIra   r2  c                       e Zd ZdZdZdS )ClientConstantszInternal LSP Client constants.z
lsp-cancelN)r@   rA   rB   rC   CANCELr`   ra   rb   r7  r7    s        ((FFFra   r7  c                       e Zd ZdZdZdS )WorkspaceUpdateKindadditiondeletionN)r@   rA   rB   ADDITIONDELETIONr`   ra   rb   r:  r:    s        HHHHra   r:  zspyder.completionsc                       e Zd ZdZd Zd ZdS )CompletionConfigurationObserverz
    Extension to the :class:`spyder.api.config.mixins.SpyderConfigurationObserver`
    mixin implementation to consider a nested provider configuration.
    c                    t          |           D ]}t          | |d          }t          |d          r|j        }t	          |          dk    r| xj        |hz  c_        |D ]\  }}|(d}|dk    rd| j        df}n|                     |          }| j        	                    |i           }|	                    |g           }|
                    |           |||<   || j        |<   dS )z7Gather all the methods decorated with `on_conf_change`.N_conf_listenr$   completions	__sectionprovider_configurationvalues)dirgetattrhasattrrB  len_multi_option_listenersCOMPLETION_PROVIDER_NAME_wrap_provider_option_configuration_listenersgetappend)selfmethod_namerh   infosectionoptionsection_listenersoption_listenerss           rb   _gather_observersz1CompletionConfigurationObserver._gather_observers  s.   t99 	O 	OKT;55Fv~.. O*t99q==00[MA00'+ O OOGV"/![00 8 $ = (&FF &*%?%?%G%GF(,(E(I(I)% )%%'8'<'<VR'H'H$$++K8880@%f-=ND1'::1	O 	Ora   c                 b    t          |t                    rd| j        dg|R }nd| j        d|f}|S )NrE  rF  )r   tuplerL  )rQ  rU  s     rb   rM  z5CompletionConfigurationObserver._wrap_provider_option  sW    fe$$ 	(- 	 FF )-	F ra   N)r@   rA   rB   rC   rX  rM  r`   ra   rb   r@  r@    s?         
O O O8    ra   r@  c            	       l   e Zd ZdZ eeee          Z	  ee          Z		  eee          Z
	  ee          Z	  ee          Z	  eeeee          Z	  ee          Z	  ee          Z	  ee          Z	 dZdZdZg ZdZg Zg Zd ZdefdZd	ed
efdZd	edededefdZd	ededefdZdedefdZdedefdZ dedede!fdZ" e#ee          d             Z$ e#            d             Z%d
ed	efdZ&d	ede'fdZ(d	efdZ)d  Z*d! Z+de'fd"Z,d# Z-	 	 d;d$e.ee/ed%f         f         d&e!d'e0e         de!fd(Z1	 	 d<d$e.ee/ed%f         f         d*e!d'e0e         d+e'fd,Z2dd-dddde3j4        ddf	d.Z5d;d/Z6d=d0Z7d;d1Z8	 	 d;d2e0e         d3e0e         fd4Z9d5 Z:	 	 d;d6Z;	 	 	 d>d7Z<	 d?d8ed9e0e         fd:Z=dS )@SpyderCompletionProviderz
    Spyder provider API for completion providers.

    All completion providers must implement this interface in order to interact
    with Spyder CodeEditor and Projects manager.
    NFz0.1.0c                     ||j         nd| _         t          j        | |           t                              |            || _        || _        dS )a  
        Main completion provider constructor.

        Parameters
        ----------
        parent: spyder.plugins.completion.plugin.CompletionPlugin
            Instance of the completion plugin that manages this provider
        config: dict
            Current provider configuration values, whose keys correspond to
            the ones defined on `CONF_DEFAULTS` and the values correspond to
            the current values according to the Spyder configuration system.
        NrC  )CONF_SECTIONr   __init__r@  mainconfig)rQ  parentrb  s      rb   r`  z!SpyderCompletionProvider.__init__  s[     !' 2 $008E 	 	v&&&'00666	ra   returnc                     dS )z8Return a human readable name of the completion provider. r`   rQ  s    rb   get_namez!SpyderCompletionProvider.get_name  s    rra   languagefilenamec                     dS )a  
        Register file to perform completions.
        If a language provider is not available for a given file, then this
        method should keep a queue, such that files can be initialized once
        a server is available.

        Parameters
        ----------
        language: str
            Programming language of the given file
        filename: str
            Filename to register
        codeeditor: spyder.plugins.editor.widgets.codeeditor.CodeEditor
            Codeeditor to send the provider configurations
        Nr`   )rQ  ri  rj  
codeeditors       rb   register_filez&SpyderCompletionProvider.register_file  	      	ra   req_typereqreq_idc                     dS )a  
        Send completion/introspection request from Spyder.
        The completion request `req_type` needs to have a response.

        Parameters
        ----------
        language: str
            Programming language for the incoming request
        req_type: str
            Type of request, one of
            :class:`spyder.plugins.completion.api.CompletionRequestTypes`
        req: dict
            Request body
            {
                'filename': str,
                **kwargs: request-specific parameters
            }
        req_id: int
            Request identifier for response

        Notes
        -----
        A completion client should always reply to the
        `textDocument/completion` request, even if the answer is empty.
        Nr`   )rQ  ri  ro  rp  rq  s        rb   send_requestz%SpyderCompletionProvider.send_request  s	    6 	ra   notification_typenotificationc                     dS )aD  
        Send notification to completion server based on Spyder changes.
        All notifications sent won't return a response by the provider.

        Parameters
        ----------
        language: str
            Programming language for the incoming request
        notification_type: str
            Type of request, one of
            :class:`spyder.plugins.completion.api.CompletionRequestTypes`
        notification: dict
            Request body
            {
                'filename': str,
                **kwargs: request-specific parameters
            }
        Nr`   )rQ  ri  rt  ru  s       rb   send_notificationz*SpyderCompletionProvider.send_notification  s	    ( 	ra   c                     dS )a  
        Send a broadcast notification across all programming languages.

        Parameters
        ----------
        notification_type: str
            Type of request, one of
            :class:`spyder.plugins.completion.CompletionTypes`
        notification: dict
            Notification body
            {
                **kwargs: notification-specific parameters
            }
        Nr`   )rQ  rt  ru  s      rb   broadcast_notificationz/SpyderCompletionProvider.broadcast_notification  rn  ra   responseresp_idc                     dS )a$  
        Send response for server request.

        Parameters
        ----------
        response: dict
            Response body for server
            {
                **kwargs: response-specific keys
            }
        resp_id: int
            Request identifier for response
        Nr`   )rQ  rz  r{  s      rb   send_responsez&SpyderCompletionProvider.send_response  s	     	ra   project_pathupdate_kindinstancec                     dS )a  
        Handle project path updates on Spyder.

        Parameters
        ----------
        project_path: str
            Path to the project folder being added or removed.
        update_kind: str
            Path update kind, one of
            :class:`spyder.plugins.completion.api.WorkspaceUpdateKind`
        instance: object
            Reference to :class:`spyder.plugins.projects.plugin.Projects`
        Nr`   )rQ  r~  r  r  s       rb   project_path_updatez,SpyderCompletionProvider.project_path_update  s	     	ra   c                     dS )a  
        Handle Python path updates on Spyder.

        Parameters
        ----------
        previous_path: Dict
            Dictionary containing the previous Python path values.
        new_path: Dict
            Dictionary containing the current Python path values.
        Nr`   )rQ  previous_pathnew_paths      rb   python_path_updatez+SpyderCompletionProvider.python_path_update&  s	     	ra   c                     dS )z8Handle changes on the main Python interpreter of Spyder.Nr`   rg  s    rb   main_interpreter_changedz1SpyderCompletionProvider.main_interpreter_changed4  s	     	ra   c                     dS )ak  
        Handle file modifications and file switching events, including when a
        new file is created.

        Parameters
        ----------
        filename: str
            Path to the file that was changed/opened/updated.
        language: str
            Name of the programming language of the file that was
            changed/opened/updated.
        Nr`   )rQ  rj  ri  s      rb   file_opened_closed_or_updatedz6SpyderCompletionProvider.file_opened_closed_or_updated9  s	     	ra   c                     dS )a9  
        Start completions/introspection services for a given language.

        Parameters
        ----------
        language: str
            Programming language to start analyzing.

        Returns
        -------
        bool
            True if language provider could be started, otherwise False.
        Fr`   rQ  ri  s     rb   &start_completion_services_for_languagez?SpyderCompletionProvider.start_completion_services_for_languageH  s	     ura   c                     dS )z
        Stop completions/introspection services for a given language.

        Parameters
        ----------
        language: str
            Programming language to stop analyzing.
        Nr`   r  s     rb   %stop_completion_services_for_languagez>SpyderCompletionProvider.stop_completion_services_for_languageX  s	     	ra   c                      t          d          )a`  
        Start completion provider.

        The completion provider startup logic must be invoked on this method.

        Note: Once the completion provider is ready,
        the signal `sig_provider_ready` must be emitted with the completion
        provider name, e.g.,
        `self.sig_provider_ready.emit(self.COMPLETION_PROVIDER_NAME)`
        z,A completion provider must implement start())NotImplementedErrorrg  s    rb   startzSpyderCompletionProvider.startc  s     ":< < 	<ra   c                     dS )zStop completion provider.Nr`   rg  s    rb   r   z!SpyderCompletionProvider.shutdownq  s    ra   c                     dS )z<Establish if the current completion provider can be stopped.Tr`   rg  s    rb   	can_closez"SpyderCompletionProvider.can_closeu  s    tra   c                     dS )zO
        Actions to be performed after the main window has been shown.
        Nr`   rg  s    rb   on_mainwindow_visiblez.SpyderCompletionProvider.on_mainwindow_visibley  s	     	ra   option_name.defaultrT  c                     |0d}t          |t                    rd| j        dg|R }nd| j        d|f}| j                            |||          S )a  
        Retrieve an option value from the provider settings dictionary or
        the global Spyder configuration.

        Parameters
        ----------
        option_name: str
            Option name to lookup for in the provider settings
            dictionary/global Spyder configuration.
        default: Any
            Default value to return if `option_name` was not found.
        section: Optional[str]
            If None, then the option is retrieved from the local provider
            configuration. Otherwise, lookup on the global Spyder one.

        Returns
        -------
        Any
            Either the default value if `option_name` was not found on the
            settings or the actual stored value.
        NrC  rE  rF  )r  rT  )r   rZ  rL  ra  get_conf)rQ  r  r  rT  s       rb   r  z!SpyderCompletionProvider.get_conf  s    2 ?#G+u-- ,1 !	  -1	 y!!' " ; ; 	;ra   Tr   recursive_notificationc                     |0d}t          |t                    rd| j        dg|R }nd| j        d|f}| j                            ||||           dS )a  
        Set an option in the provider configuration settings dictionary or
        the global Spyder configuration.

        Parameters
        ----------
        option_name: str
            Option name to lookup for in the provider settings
            dictionary/global Spyder configuration.
        value: Any
            Value to set in the configuration system.
        section: Optional[str]
            If None, then the option is retrieved from the local provider
            configuration. Otherwise, lookup on the global Spyder one.
        recursive_notification: bool
            If True, all objects that observe all changes on the
            configuration section and objects that observe partial tuple paths
            are notified. For example if the option `opt` of section `sec`
            changes, then the observers for section `sec` are notified.
            Likewise, if the option `(a, b, c)` changes, then observers for
            `(a, b, c)`, `(a, b)` and a are notified as well.
        NrC  rE  rF  )rT  r  )r   rZ  rL  ra  set_conf)rQ  r  r   rT  r  s        rb   r  z!SpyderCompletionProvider.set_conf  s    6 ?#G+u-- ,1 !	  -1	 		;w2H 	 	J 	J 	J 	J 	Jra   rf  c                 L    | j                             |||||||||	|
|          S )a9  
        name: str
            unique identifiable name for the action
        text: str
           Localized text for the action
        icon: QIcon,
            Icon for the action when applied to menu or toolbutton.
        icon_text: str
            Icon for text in toolbars. If True, this will also disable
            the tooltip on this toolbutton if part of a toolbar.
        tip: str
            Tooltip to define for action on menu or toolbar.
        toggled: callable
            The callable to use when toggling this action
        triggered: callable
            The callable to use when triggering this action.
        shortcut_context: str
            Set the `str` context of the shortcut.
        context: Qt.ShortcutContext
            Set the context for the shortcut.
        initial: object
            Sets the initial state of a togglable action. This does not emit
            the toggled signal.
        register_shortcut: bool, optional
            If True, main window will expose the shortcut in Preferences.
            The default value is `False`.

        Notes
        -----
        There is no need to set shortcuts right now. We only create actions
        with this (and similar methods) and these are then exposed as possible
        shortcuts on provider registration in the main window with the
        register_shortcut argument.

        If icon_text is True, this will also disable the tooltip.

        If a shortcut is found in the default config then it is assigned,
        otherwise it's left blank for the user to define one for it.
        )	icon	icon_texttiptoggled	triggeredshortcut_contextcontextinitialregister_shortcut)ra  create_action)rQ  nametextr  r  r  r  r  r  r  r  r  s               rb   r  z&SpyderCompletionProvider.create_action  sB    V y&&$TYCy-w/@	 ' B B 	Bra   c                 <    | j                             |||          S )a  
        Return an action by name, context and plugin.

        Parameters
        ----------
        name: str
            Name of the action to retrieve.
        context: Optional[str]
            Widget or context identifier under which the action was stored.
            If None, then `CONTEXT_NAME` is used instead
        plugin: Optional[str]
            Name of the plugin where the action was defined. If None, then
            `PLUGIN_NAME` is used.

        Returns
        -------
        action: SpyderAction
            The corresponding action stored under the given `name`, `context`
            and `plugin`.

        Raises
        ------
        KeyError
            If either of `name`, `context` or `plugin` keys do not exist in the
            toolbar registry.
        )r  plugin)ra  
get_action)rQ  r  r  r  s       rb   r  z#SpyderCompletionProvider.get_action
  s!    6 y##D'&#IIIra   c                 @    | j                             |||           dS )z
        Create a Spyder application menu.

        Parameters
        ----------
        menu_id: str
            The menu unique identifier string.
        title: str
            The localized menu title to be displayed.
        )dynamicN)ra  create_application_menu)rQ  menu_idtitler  s       rb   r  z0SpyderCompletionProvider.create_application_menu'  s'     		))'5')JJJJJra   c                 @    | j                             |||           dS )a7  
        Create a menu.

        Parameters
        ----------
        name: str
            Unique str identifier.
        text: str or None
            Localized text string.
        icon: QIcon or None
            Icon to use for the menu.

        Return: QMenu
            Return the created menu.
        )r  r  N)ra  create_menu)rQ  r  r  r  s       rb   r  z$SpyderCompletionProvider.create_menu4  s'      		dD99999ra   r  r  c                 d    ||t           j        }t           j                            | ||          S )zRetrieve a menu by its id.)rQ  rL  ra  get_menu)r  r  r  s      rb   r  z!SpyderCompletionProvider.get_menuF  s/     ?v~3Gy!!$888ra   c                 6    | j                             |          S )z
        Return an application menu by menu unique id.

        Parameters
        ----------
        menu_id: ApplicationMenu
            The menu unique identifier string.
        )ra  get_application_menu)rQ  r  s     rb   r  z-SpyderCompletionProvider.get_application_menuM  s     y--g666ra   c                 B    | j                             ||||           dS )z>
        Add a SpyderAction or a QWidget to the menu.
        )rT  beforeN)ra  add_item_to_menu)rQ  action_or_menumenurT  r  s        rb   r  z)SpyderCompletionProvider.add_item_to_menuX  s;    
 		""D'& 	# 	B 	B 	B 	B 	Bra   c                 D    | j                             |||||           dS )a  
        Add action or widget `item` to given application menu `section`.

        Parameters
        ----------
        item: SpyderAction or SpyderMenu
            The item to add to the `menu`.
        menu: ApplicationMenu or None
            Instance of a Spyder application menu.
        menu_id: str or None
            The application menu unique string identifier.
        section: str or None
            The section id in which to insert the `item` on the `menu`.
        before: str or None
            Make the item appear before another given item.
        before_section: Section or None
            Make the item section (if provided) appear before another
            given section.

        Notes
        -----
        Must provide a `menu` or a `menu_id`.
        )r  rT  r  before_sectionN)ra  add_item_to_application_menu)rQ  itemr  rT  r  r  s         rb   r  z5SpyderCompletionProvider.add_item_to_application_menu`  s9    4 		..'7. 	/ 	: 	: 	: 	: 	:ra   item_idr  c                 >    | j                             ||           dS )a  
        Remove action or widget from given application menu by id.

        Parameters
        ----------
        item_id: str
            The item identifier to remove from the given menu.
        menu_id: str or None
            The application menu unique string identifier.
        )r  N)ra  !remove_item_from_application_menu)rQ  r  r  s      rb   r  z:SpyderCompletionProvider.remove_item_from_application_menu~  s%     		33GW3MMMMMra   )NN)NT)T)NNNN)N)>r@   rA   rB   rC   r   strr   dictsig_response_readysig_provider_ready"sig_language_completions_availablesig_disable_providerru   sig_show_widgetrZ  sig_call_statusbarsig_open_filesig_stop_completionssig_exception_occurredrL  DEFAULT_ORDERSLOWCONF_DEFAULTSCONF_VERSION	CONF_TABSSTATUS_BAR_CLASSESr`  rh  rm  rs  rw  ry  r}  r   r  r	   r  r  r  boolr  r  r  r   r  r  r   r   r   r  r  r
   WidgetWithChildrenShortcutr  r  r  r  r  r  r  r  r  r`   ra   rb   r\  r\    s'          S$//   *0c):):& "6#;; fVnnO  S%66" F3KKM "6#;;	 $VD\\D  $ M D M L
 I"   *#    c S    $+.59CF   :47GK   ,%(8<   $d S      # &)   " 
T&&   
TVV  Vc S    s t     	c 	 	 	 	< < <  4       !%*.*; *;#CsCx$89*;*; #3-*; 47*; *; *; *;^ +/04	,J ,J#CsCx$89,J,J #3-,J *.	,J ,J ,J ,J\ .2RT"dT ;T(-/B /B /B /BbJ J J J:K K K K: : : :$ 15)-9 9 9!#9 9 9 9	7 	7 	7 >B $B B B B :>:>48: : : :> DHN N N3;C=N N N N N Nra   r\  )OrC   typingr   r   r   r   qtpy.QtCorer   r   r	   r
   spyder.api.config.mixinsr   SUPPORTED_LANGUAGESr#   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   SYMBOL_KIND_ICONr   r   r   r   r   r   r   __dict__rF  WORKSPACE_CAPABILITIESTEXT_EDITOR_CAPABILITESCLIENT_CAPABILITESr   SAVE_OPTIONSr   TEXT_DOCUMENT_SYNC_OPTIONSCOMPLETION_OPTIONSSIGNATURE_HELP_OPTIONSCODE_LENS_OPTIONS#DOCUMENT_ON_TYPE_FORMATTING_OPTIONSDOCUMENT_LINK_OPTIONSEXECUTE_COMMAND_OPTIONSWORKSPACE_OPTIONSSERVER_CAPABILITESr   r   r   r&  r/  r2  r7  r:  COMPLETION_ENTRYPOINTr@  r\  r`   ra   rb   <module>r     s    / . . . . . . . . . . . 2 1 1 1 1 1 1 1 1 1 1 1 A @ @ @ @ @          FOVx + 		
 g x  g M OV +    x  x!" 	#$ gxNEOVMxg/nOV9  F              6 6 6 6 6 6 6 6. 
  4;4;4;= /<	 	 	t 	t 	t  $
  4 4J,?,F,F,H,H 4 4 4

 
 u; ; H  $ 
 "
 ! 0  $ # %0=

 

	 *  $ &   $ "K=!
	 	" 	t 	t 	t 	t 	t 	t 	t 	t 	t 	t 	tw^ ^ H (+          4 
 #'   !  2       u  " ' ' # u    $  ; 2	; U; ,; 3;  %!;& %';,  -;2 e3;8 u9;> %?;D )E;J !%K;P &uQ;V '(KW;\ e];b 1c;h 5i;n # u; ; ; |       47 47 47 47 47 47 47 47r              ,                             - 1 1 1 1 1&A 1 1 1hy
N y
N y
N y
N y
Nw(G y
N y
N y
N y
N y
Nra   