Skip to content

Commit

Permalink
fixup: type object 'LspPyrightPlugin' has no attribute 'update_venv_i…
Browse files Browse the repository at this point in the history
…nfo'

Signed-off-by: Jack Cherng <[email protected]>
  • Loading branch information
jfcherng committed Nov 1, 2024
1 parent 0405067 commit 745b359
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions plugin/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

from .constants import PACKAGE_NAME, SERVER_SETTING_DEV_ENVIRONMENT
from .dev_environment.helpers import get_dev_environment_handler
from .log import log_error, log_info, log_warning
from .log import log_error, log_warning
from .utils_lsp import AbstractLspPythonPlugin, find_workspace_folder, update_view_status_bar_text, uri_to_file_path
from .virtual_env.helpers import find_venv_by_finder_names

Expand Down Expand Up @@ -85,23 +85,8 @@ def on_settings_changed(self, settings: DottedDict) -> None:
except Exception as ex:
log_error(f'Failed to update extra paths for dev environment "{dev_environment}": {ex}')

self.update_status_bar_text()

@classmethod
def on_pre_start(
cls,
window: sublime.Window,
initiating_view: sublime.View,
workspace_folders: list[WorkspaceFolder],
configuration: ClientConfig,
) -> str | None:
super().on_pre_start(window, initiating_view, workspace_folders, configuration)

cls.update_venv_info(configuration.settings, workspace_folders, window=window)
if venv_info := cls.window_attrs[window].venv_info:
log_info(f"Using python executable: {venv_info.python_executable}")
configuration.settings.set("python.pythonPath", str(venv_info.python_executable))
return None
if active_view := sublime.active_window().active_view():
update_view_status_bar_text(self.__class__, active_view)

@classmethod
def install_or_update(cls) -> None:
Expand Down

0 comments on commit 745b359

Please sign in to comment.