Skip to content

Commit e7f7aed

Browse files
authored
Minor UI changes to the display names of the interpreters (#2643)
For #1351
1 parent 2e06c9d commit e7f7aed

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/client/interpreter/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export class InterpreterHelper implements IInterpreterHelper {
8686
return 'venv';
8787
}
8888
case InterpreterType.VirtualEnv: {
89-
return 'virtualEnv';
89+
return 'virtualenv';
9090
}
9191
default: {
9292
return '';

src/client/interpreter/interpreterService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ export class InterpreterService implements Disposable, IInterpreterService {
172172
* @memberof InterpreterService
173173
*/
174174
public async getDisplayName(info: Partial<PythonInterpreter>, resource?: Uri): Promise<string> {
175-
const store = this.persistentStateFactory.createGlobalPersistentState<string>(`${info.path}.interpreter.displayName.v2`, undefined, EXPITY_DURATION);
175+
const store = this.persistentStateFactory.createGlobalPersistentState<string>(`${info.path}.interpreter.displayName.v3`, undefined, EXPITY_DURATION);
176176
if (store.value) {
177177
return store.value;
178178
}
@@ -194,7 +194,7 @@ export class InterpreterService implements Disposable, IInterpreterService {
194194
info.envName = await virtualEnvMgr.getEnvironmentName(info.path, resource);
195195
}
196196
if (info.envName && info.envName.length > 0) {
197-
envSuffixParts.push(info.envName);
197+
envSuffixParts.push(`'${info.envName}'`);
198198
}
199199
if (info.type) {
200200
const interpreterHelper = this.serviceContainer.get<IInterpreterHelper>(IInterpreterHelper);

src/test/interpreters/interpreterService.unit.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ suite('Interpreters service', () => {
586586
interpreterInfo.envName = pipEnvName;
587587
}
588588
if (interpreterInfo.envName && interpreterInfo.envName.length > 0) {
589-
envSuffixParts.push(interpreterInfo.envName);
589+
envSuffixParts.push(`'${interpreterInfo.envName}'`);
590590
}
591591
if (interpreterInfo.type) {
592592
envSuffixParts.push(`${interpreterType!.name}_display`);

0 commit comments

Comments
 (0)