Skip to content

Commit 2db24aa

Browse files
authored
Remove single quotes surrounding displayed venv (#25102)
Fixes #23978 Removed single quotes both from the Select Interpreter list: ![Screenshot from 2025-05-22 17-35-29](https://github.com/user-attachments/assets/6ba1df87-51c9-4cdf-9231-abd84bd4abf7) And also from the status bar: ![Screenshot from 2025-05-22 17-36-00](https://github.com/user-attachments/assets/472a63b7-45ab-435e-9923-612c8c32941c)
1 parent eed5eb0 commit 2db24aa

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/client/pythonEnvironments/nativeAPI.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,14 @@ function getDisplayName(version: PythonVersion, kind: PythonEnvKind, arch: Archi
112112
const kindStr = kindToShortString(kind);
113113
if (arch === Architecture.x86) {
114114
if (kindStr) {
115-
return name ? `Python ${versionStr} 32-bit ('${name}')` : `Python ${versionStr} 32-bit (${kindStr})`;
115+
return name ? `Python ${versionStr} 32-bit (${name})` : `Python ${versionStr} 32-bit (${kindStr})`;
116116
}
117-
return name ? `Python ${versionStr} 32-bit ('${name}')` : `Python ${versionStr} 32-bit`;
117+
return name ? `Python ${versionStr} 32-bit (${name})` : `Python ${versionStr} 32-bit`;
118118
}
119119
if (kindStr) {
120-
return name ? `Python ${versionStr} ('${name}')` : `Python ${versionStr} (${kindStr})`;
120+
return name ? `Python ${versionStr} (${name})` : `Python ${versionStr} (${kindStr})`;
121121
}
122-
return name ? `Python ${versionStr} ('${name}')` : `Python ${versionStr}`;
122+
return name ? `Python ${versionStr} (${name})` : `Python ${versionStr}`;
123123
}
124124

125125
function validEnv(nativeEnv: NativeEnvInfo): boolean {

src/test/pythonEnvironments/nativeAPI.unit.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ suite('Native Python API', () => {
5353
const expectedBasicEnv: PythonEnvInfo = {
5454
arch: Architecture.Unknown,
5555
id: '/usr/bin/python',
56-
detailedDisplayName: "Python 3.12.0 ('basic_python')",
57-
display: "Python 3.12.0 ('basic_python')",
56+
detailedDisplayName: 'Python 3.12.0 (basic_python)',
57+
display: 'Python 3.12.0 (basic_python)',
5858
distro: { org: '' },
5959
executable: { filename: '/usr/bin/python', sysPrefix: '/usr/bin', ctime: -1, mtime: -1 },
6060
kind: PythonEnvKind.System,
@@ -98,8 +98,8 @@ suite('Native Python API', () => {
9898

9999
const expectedConda1: PythonEnvInfo = {
100100
arch: Architecture.Unknown,
101-
detailedDisplayName: "Python 3.12.0 ('conda_python')",
102-
display: "Python 3.12.0 ('conda_python')",
101+
detailedDisplayName: 'Python 3.12.0 (conda_python)',
102+
display: 'Python 3.12.0 (conda_python)',
103103
distro: { org: '' },
104104
id: '/home/user/.conda/envs/conda_python/python',
105105
executable: {

0 commit comments

Comments
 (0)