From 30c84f15e6d0946477f9bdd720092d9bd251b882 Mon Sep 17 00:00:00 2001 From: Michael Panchenko Date: Tue, 14 Jul 2026 10:38:25 +0200 Subject: [PATCH] Pyright: bump timeout for waiting for initial analysis from 5s to 60s. --- CHANGELOG.md | 1 + src/solidlsp/language_servers/pyright_server.py | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7fd62a6..4952c3bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -102,6 +102,7 @@ Status of the `main` branch. Changes prior to the next official version change w the repository. #1627 - Rename configuration option `additional_workspace_folders` to `ls_additional_workspace_folders` and support the option across all language servers (previously limited to TypeScript). + - `Pyright`: bump timeout for waiting for initial analysis from 5s to 60s. * JetBrains: - Add configuration option `jetbrains_launch_command`, allowing Serena to spawn IDE instances automatically diff --git a/src/solidlsp/language_servers/pyright_server.py b/src/solidlsp/language_servers/pyright_server.py index b808d8f7..4a8c9fbc 100644 --- a/src/solidlsp/language_servers/pyright_server.py +++ b/src/solidlsp/language_servers/pyright_server.py @@ -24,6 +24,8 @@ class PyrightServer(SolidLanguageServer): Contains various configurations and settings specific to Python. """ + _TIMEOUT_FOR_INITIAL_ANALYSIS = 60.0 + def __init__(self, config: LanguageServerConfig, repository_root_path: str, solidlsp_settings: SolidLSPSettings): """ Creates a PyrightServer instance. This class is not meant to be instantiated directly. @@ -231,8 +233,8 @@ class PyrightServer(SolidLanguageServer): # Wait for Pyright to complete its initial workspace analysis # This prevents zombie processes by ensuring background tasks finish - log.info("Waiting for Pyright to complete initial workspace analysis...") - if self.analysis_complete.wait(timeout=5.0): + log.info(f"Waiting up to {self._TIMEOUT_FOR_INITIAL_ANALYSIS}s for Pyright to complete initial workspace analysis...") + if self.analysis_complete.wait(timeout=self._TIMEOUT_FOR_INITIAL_ANALYSIS): log.info("Pyright initial analysis complete, server ready") else: log.warning("Timeout waiting for Pyright analysis completion, proceeding anyway")