Skip to content

Commit

Permalink
fix non-user code (eg. typeshed stubs) being counted as files to anal…
Browse files Browse the repository at this point in the history
…yze when they aren't actually being analyzed, which caused a "files to analyze" notification to hang forever on files that never get analyzed
  • Loading branch information
DetachHead committed Jan 5, 2025
1 parent 1e8c733 commit 97ddbd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/pyright-internal/src/analyzer/program.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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++
Expand Down

0 comments on commit 97ddbd6

Please sign in to comment.