From 861128fd8ef4cfd76bc0be4ef0fd52404ca2d0b5 Mon Sep 17 00:00:00 2001 From: Stella Huang Date: Mon, 6 Apr 2026 15:36:53 -0700 Subject: [PATCH] refactor: simplify getRefreshOptions return type to always return RefreshOptions --- src/managers/common/nativePythonFinder.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/managers/common/nativePythonFinder.ts b/src/managers/common/nativePythonFinder.ts index 2094d4d5..afd5946b 100644 --- a/src/managers/common/nativePythonFinder.ts +++ b/src/managers/common/nativePythonFinder.ts @@ -435,7 +435,7 @@ class NativePythonFinderImpl implements NativePythonFinder { this.connection.dispose(); } - private getRefreshOptions(options?: NativePythonEnvironmentKind | Uri[]): RefreshOptions | undefined { + private getRefreshOptions(options?: NativePythonEnvironmentKind | Uri[]): RefreshOptions { // Note: venvFolders is also fetched in getAllExtraSearchPaths() for configure(). // This duplication is intentional: when searchPaths is provided to the native finder, // it may override (not supplement) the configured environmentDirectories. @@ -452,8 +452,8 @@ class NativePythonFinderImpl implements NativePythonFinder { return { searchPaths: uriSearchPaths }; } } - // return undefined to use configured defaults (for nativeFinder refresh) - return undefined; + // return empty object to use configured defaults (for nativeFinder refresh) + return {}; } private start(): rpc.MessageConnection {