Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions packages/pyright-internal/src/realLanguageServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,9 @@ export abstract class RealLanguageServer extends LanguageServerBase {
}
}

const pythonAnalysisSection =
(await this.getConfiguration(workspace.rootUri, 'basedpyright.analysis')) ||
// this is undocumented, but we support the old section names for backwards compatibility with the pycharm pyright plugin
pythonSection?.analysis;
const basedpyrightSection = await this.getConfiguration(workspace.rootUri, 'basedpyright');
// this is undocumented, but we support the old section names for backwards compatibility with the pycharm pyright plugin
const pythonAnalysisSection = basedpyrightSection?.analysis || pythonSection?.analysis;
if (pythonAnalysisSection) {
const typeshedPaths = pythonAnalysisSection.typeshedPaths;
if (typeshedPaths && Array.isArray(typeshedPaths) && typeshedPaths.length > 0) {
Expand Down Expand Up @@ -258,10 +257,8 @@ export abstract class RealLanguageServer extends LanguageServerBase {
serverSettings.autoSearchPaths = true;
}

const pyrightSection =
(await this.getConfiguration(workspace.rootUri, 'basedpyright')) ||
// this is undocumented, but we support the old section names for backwards compatibility with the pycharm pyright plugin
(await this.getConfiguration(workspace.rootUri, 'pyright'));
// this is undocumented, but we support the old section names for backwards compatibility with the pycharm pyright plugin
const pyrightSection = basedpyrightSection || (await this.getConfiguration(workspace.rootUri, 'pyright'));
if (pyrightSection) {
if (pyrightSection.openFilesOnly !== undefined) {
serverSettings.openFilesOnly = !!pyrightSection.openFilesOnly;
Expand Down
Loading