Skip to content

Commit

Permalink
Merge pull request #14 from dalthviz/config_update
Browse files Browse the repository at this point in the history
PR: Remove some unused configs and do some final code clean up
  • Loading branch information
dalthviz authored Nov 13, 2023
2 parents 2f82e26 + bd5a3f9 commit f58a520
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 16 deletions.
2 changes: 1 addition & 1 deletion kite_provider/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from qtpy.QtCore import QObject, QThread, Signal, QMutex
import requests

#Spyder imports
# Spyder imports
from spyder.config.base import _, running_under_pytest
from spyder.py3compat import TEXT_TYPES

Expand Down
1 change: 0 additions & 1 deletion kite_provider/parsing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# Licensed under the terms of the MIT License

# Standard library imports
import logging
import re


Expand Down
21 changes: 13 additions & 8 deletions kite_provider/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
from spyder.api.config.decorators import on_conf_change
from spyder.config.base import _, running_under_pytest, get_module_data_path
from spyder.plugins.completion.api import SpyderCompletionProvider
from spyder.plugins.mainmenu.api import ApplicationMenus, ToolsMenuSections
from spyder.utils.icon_manager import ima
from spyder.utils.image_path_manager import IMAGE_PATH_MANAGER
from spyder.utils.programs import run_program

Expand All @@ -39,16 +37,16 @@ class KiteProvider(SpyderCompletionProvider):
DEFAULT_ORDER = 1
SLOW = True
CONF_DEFAULTS = [
('spyder_runs', 1),
('show_installation_dialog', True),
('show_onboarding', True),
('show_installation_error_message', True)
]
CONF_VERSION = "0.1.0"
CONF_VERSION = "1.0.0"

def __init__(self, parent, config):
super().__init__(parent, config)
IMAGE_PATH_MANAGER.add_image_path(get_module_data_path('kite_provider',relpath='images'))
IMAGE_PATH_MANAGER.add_image_path(
get_module_data_path('kite_provider', relpath='images')
)
self.available_languages = []
self.client = KiteClient(None)
self.kite_process = None
Expand All @@ -74,7 +72,6 @@ def __init__(self, parent, config):
# Config
self.update_kite_configuration(self.config)


# ------------------ SpyderCompletionProvider methods ---------------------
def get_name(self):
return 'Kite'
Expand Down Expand Up @@ -111,7 +108,15 @@ def start(self):
"directory that appears bellow, "
"and try a reinstallation:<br><br>"
"<code>{kite_dir}</code>").format(
kite_dir=osp.dirname(path))
kite_dir=osp.dirname(path)
)

def wrap_message(parent):
return QMessageBox.critical(
parent, _('Kite error'), err_str
)

self.sig_show_widget.emit(wrap_message)

finally:
# Always start client to support possibly undetected Kite builds
Expand Down
2 changes: 0 additions & 2 deletions kite_provider/utils/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,3 @@ def status(extra_status=''):
return RUNNING + extra_status
else:
return NOT_RUNNING + extra_status


4 changes: 0 additions & 4 deletions kite_provider/widgets/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
# Standard library imports
import logging

# Third party imports
from qtpy.QtCore import Slot

# Spyder imports
from spyder.api.widgets.status import StatusBarWidget
from spyder.config.base import _
Expand All @@ -38,7 +35,6 @@ def __init__(self, parent, provider):
is_installed, _ = check_if_kite_installed()
self.setVisible(is_installed)


def set_value(self, value):
"""Return Kite completions state."""
kite_enabled = self.provider.get_conf(('enabled_providers', 'kite'),
Expand Down

0 comments on commit f58a520

Please sign in to comment.