forked from qt-creator/qt-creator
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:
@@ -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;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user