From 97ddbd66ba4804b6577ea8e03554132d651e895d Mon Sep 17 00:00:00 2001 From: detachhead Date: Sun, 5 Jan 2025 17:01:04 +1000 Subject: [PATCH] fix non-user code (eg. typeshed stubs) being counted as files to analyze when they aren't actually being analyzed, which caused a "files to analyze" notification to hang forever on files that never get analyzed --- packages/pyright-internal/src/analyzer/program.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pyright-internal/src/analyzer/program.ts b/packages/pyright-internal/src/analyzer/program.ts index 549599659..95e7a1d8e 100644 --- a/packages/pyright-internal/src/analyzer/program.ts +++ b/packages/pyright-internal/src/analyzer/program.ts @@ -544,7 +544,7 @@ export class Program { this._sourceFileList.forEach((fileInfo) => { const sourceFile = fileInfo.sourceFile; - if (sourceFile.isCheckingRequired()) { + if (isUserCode(fileInfo) && sourceFile.isCheckingRequired()) { if (this._shouldCheckFile(fileInfo)) { sourceFile.getIPythonMode() === IPythonMode.CellDocs ? cellsToAnalyzeCount++