Fixed bug that led to divergent behaviors between pyrightconfig.json and pyproject.toml configurations. Specifically, default exclude patterns were not added in the case of pyproject.toml. This addresses #8102.

This commit is contained in:
Eric Traut 2024-06-08 22:24:45 -07:00
parent 238f70049f
commit 4319e03b71
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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[];