Python: Split complex call

Change-Id: I6f301342a1841d2734f0598edfcd7b3327a943c9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
hjk
2022-05-06 14:57:57 +02:00
parent 07ecff38e2
commit 6008d05b71

View File

@@ -526,9 +526,9 @@ PyLSConfigureAssistant *PyLSConfigureAssistant::instance()
const StdIOSettings *PyLSConfigureAssistant::languageServerForPython(const FilePath &python) const StdIOSettings *PyLSConfigureAssistant::languageServerForPython(const FilePath &python)
{ {
const FilePath pythonModulePath = getPylsModulePath({python, {"-m", "pylsp"}});
return findOrDefault(configuredPythonLanguageServer(), return findOrDefault(configuredPythonLanguageServer(),
[pythonModulePath = getPylsModulePath( [pythonModulePath](const StdIOSettings *setting) {
CommandLine(python, {"-m", "pylsp"}))](const StdIOSettings *setting) {
return getPylsModulePath(setting->command()) == pythonModulePath; return getPylsModulePath(setting->command()) == pythonModulePath;
}); });
} }