From 9ea762f416d28e9246c183ca2bfcc7c325da1d29 Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Fri, 13 Sep 2024 10:00:16 -0700 Subject: [PATCH] Improved comment for clarity. --- packages/pyright-internal/src/analyzer/program.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/pyright-internal/src/analyzer/program.ts b/packages/pyright-internal/src/analyzer/program.ts index 68ea46da1..138cefb02 100644 --- a/packages/pyright-internal/src/analyzer/program.ts +++ b/packages/pyright-internal/src/analyzer/program.ts @@ -1489,8 +1489,8 @@ export class Program { newImports.push(newImport); } }); - // Only mutate if absolutely necessary otherwise we - // can end up rebinding a lot of files we don't need to. + + // Mutate only when necessary to avoid extra binding operations. if ( newImports.length !== sourceFileInfo.imports.length || !newImports.every((i) => sourceFileInfo.imports.includes(i))