diff --git a/packages/pyright-internal/src/analyzer/service.ts b/packages/pyright-internal/src/analyzer/service.ts index 88101fb55..2c8f7daa9 100644 --- a/packages/pyright-internal/src/analyzer/service.ts +++ b/packages/pyright-internal/src/analyzer/service.ts @@ -643,7 +643,7 @@ export class AnalyzerService { }); } - if (!configFilePath && commandLineOptions.executionRoot) { + if (!configFilePath && !pyprojectFilePath && commandLineOptions.executionRoot) { if (commandLineOptions.includeFileSpecs.length === 0) { // If no config file was found and there are no explicit include // paths specified, assume the caller wants to include all source diff --git a/packages/pyright-internal/src/common/configOptions.ts b/packages/pyright-internal/src/common/configOptions.ts index 97794e525..2e12c5cfd 100644 --- a/packages/pyright-internal/src/common/configOptions.ts +++ b/packages/pyright-internal/src/common/configOptions.ts @@ -1128,7 +1128,7 @@ export class ConfigOptions { // Read the "include" entry. if (configObj.include !== undefined) { if (!Array.isArray(configObj.include)) { - console.error(`Config "include" entry must must contain an array.`); + console.error(`Config "include" entry must contain an array.`); } else { this.include = []; const filesList = configObj.include as string[];