Skip to content

Commit 33abf8e

Browse files
author
Kartik Raj
committed
Remove unnecessary property
1 parent afb0dcd commit 33abf8e

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/client/pythonEnvironments/base/locators/composite/envsResolver.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export class PythonEnvsResolver implements IResolvingLocator {
9595
} else if (seen[event.index] !== undefined) {
9696
const old = seen[event.index];
9797
await setKind(event.update, environmentKinds);
98-
seen[event.index] = await resolveBasicEnv(event.update, true);
98+
seen[event.index] = await resolveBasicEnv(event.update);
9999
didUpdate.fire({ old, index: event.index, update: seen[event.index] });
100100
this.resolveInBackground(event.index, state, didUpdate, seen).ignoreErrors();
101101
} else {
@@ -113,7 +113,7 @@ export class PythonEnvsResolver implements IResolvingLocator {
113113
while (!result.done) {
114114
// Use cache from the current refresh where possible.
115115
await setKind(result.value, environmentKinds);
116-
const currEnv = await resolveBasicEnv(result.value, true);
116+
const currEnv = await resolveBasicEnv(result.value);
117117
seen.push(currEnv);
118118
yield currEnv;
119119
this.resolveInBackground(seen.indexOf(currEnv), state, didUpdate, seen).ignoreErrors();

src/client/pythonEnvironments/base/locators/composite/resolverUtils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ import { traceError, traceWarn } from '../../../../logging';
2626
import { isVirtualEnvironment } from '../../../common/environmentManagers/simplevirtualenvs';
2727
import { getWorkspaceFolderPaths } from '../../../../common/vscodeApis/workspaceApis';
2828

29-
function getResolvers(): Map<PythonEnvKind, (env: BasicEnvInfo, useCache?: boolean) => Promise<PythonEnvInfo>> {
30-
const resolvers = new Map<PythonEnvKind, (_: BasicEnvInfo, useCache?: boolean) => Promise<PythonEnvInfo>>();
29+
function getResolvers(): Map<PythonEnvKind, (env: BasicEnvInfo) => Promise<PythonEnvInfo>> {
30+
const resolvers = new Map<PythonEnvKind, (_: BasicEnvInfo) => Promise<PythonEnvInfo>>();
3131
Object.values(PythonEnvKind).forEach((k) => {
3232
resolvers.set(k, resolveGloballyInstalledEnv);
3333
});
@@ -45,11 +45,11 @@ function getResolvers(): Map<PythonEnvKind, (env: BasicEnvInfo, useCache?: boole
4545
* executable and returns it. Notice `undefined` is never returned, so environment
4646
* returned could still be invalid.
4747
*/
48-
export async function resolveBasicEnv(env: BasicEnvInfo, useCache = false): Promise<PythonEnvInfo> {
48+
export async function resolveBasicEnv(env: BasicEnvInfo): Promise<PythonEnvInfo> {
4949
const { kind, source } = env;
5050
const resolvers = getResolvers();
5151
const resolverForKind = resolvers.get(kind)!;
52-
const resolvedEnv = await resolverForKind(env, useCache);
52+
const resolvedEnv = await resolverForKind(env);
5353
resolvedEnv.searchLocation = getSearchLocation(resolvedEnv);
5454
resolvedEnv.source = uniq(resolvedEnv.source.concat(source ?? []));
5555
if (getOSType() === OSType.Windows && resolvedEnv.source?.includes(PythonEnvSource.WindowsRegistry)) {

src/client/pythonEnvironments/common/environmentManagers/conda.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,8 +444,8 @@ export class Conda {
444444
* Corresponds to "conda env list --json", but also computes environment names.
445445
*/
446446
@cache(30_000, true, 10_000)
447-
public async getEnvList(useCache?: boolean): Promise<CondaEnvInfo[]> {
448-
const info = await this.getInfo(useCache);
447+
public async getEnvList(): Promise<CondaEnvInfo[]> {
448+
const info = await this.getInfo();
449449
const { envs } = info;
450450
if (envs === undefined) {
451451
return [];

0 commit comments

Comments
 (0)