From 6008d05b7157b31cdc20b802f561b752f6c8ae22 Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 6 May 2022 14:57:57 +0200 Subject: Python: Split complex call Change-Id: I6f301342a1841d2734f0598edfcd7b3327a943c9 Reviewed-by: Reviewed-by: David Schulz --- src/plugins/python/pythonlanguageclient.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/python/pythonlanguageclient.cpp') diff --git a/src/plugins/python/pythonlanguageclient.cpp b/src/plugins/python/pythonlanguageclient.cpp index 76e6fc2cb3..887911e805 100644 --- a/src/plugins/python/pythonlanguageclient.cpp +++ b/src/plugins/python/pythonlanguageclient.cpp @@ -526,9 +526,9 @@ PyLSConfigureAssistant *PyLSConfigureAssistant::instance() const StdIOSettings *PyLSConfigureAssistant::languageServerForPython(const FilePath &python) { + const FilePath pythonModulePath = getPylsModulePath({python, {"-m", "pylsp"}}); return findOrDefault(configuredPythonLanguageServer(), - [pythonModulePath = getPylsModulePath( - CommandLine(python, {"-m", "pylsp"}))](const StdIOSettings *setting) { + [pythonModulePath](const StdIOSettings *setting) { return getPylsModulePath(setting->command()) == pythonModulePath; }); } -- cgit v1.2.1