Skip to content

Commit b5769ff

Browse files
author
Kartik Raj
committed
Address internal team reviews
1 parent 895aaf6 commit b5769ff

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

src/client/proposedApi.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ export function convertCompleteEnvInfo(env: PythonEnvInfo): ResolvedEnvironment
197197
id: getEnvID(path),
198198
executable: {
199199
uri: Uri.file(env.executable.filename),
200-
bitness: convertArch(env.arch),
200+
bitness: convertBitness(env.arch),
201201
sysPrefix: env.executable.sysPrefix,
202202
},
203203
environment: env.type
@@ -272,12 +272,12 @@ function convertEnvInfoAndGetReference(env: PythonEnvInfo): Environment {
272272
return getEnvReference(convertEnvInfo(env));
273273
}
274274

275-
function convertArch(arch: Architecture) {
275+
function convertBitness(arch: Architecture) {
276276
switch (arch) {
277277
case Architecture.x64:
278-
return 'x64';
278+
return '64-bit';
279279
case Architecture.x86:
280-
return 'x86';
280+
return '32-bit';
281281
default:
282282
return 'Unknown';
283283
}

src/client/proposedApiTypes.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export type Environment = EnvironmentId & {
8383
/**
8484
* Bitness if known at this moment.
8585
*/
86-
readonly bitness: Architecture | undefined;
86+
readonly bitness: Bitness | undefined;
8787
/**
8888
* Value of `sys.prefix` in sys module if known at this moment.
8989
*/
@@ -148,7 +148,7 @@ export type ResolvedEnvironment = Environment & {
148148
/**
149149
* Bitness of the environment.
150150
*/
151-
readonly bitness: Architecture;
151+
readonly bitness: Bitness;
152152
/**
153153
* Value of `sys.prefix` in sys module.
154154
*/
@@ -206,7 +206,8 @@ export type EnvironmentId = {
206206
*/
207207
export type EnvironmentTools = KnownEnvironmentTools | string;
208208
/**
209-
* Tools or plugins the Python extension is aware of.
209+
* Tools or plugins the Python extension currently has built-in support for. Note this list is expected to shrink
210+
* once tools have their own separate extensions.
210211
*/
211212
export type KnownEnvironmentTools =
212213
| 'Conda'
@@ -223,14 +224,15 @@ export type KnownEnvironmentTools =
223224
*/
224225
export type EnvironmentType = KnownEnvironmentTypes | string;
225226
/**
226-
* Environment types the Python extension is aware of.
227+
* Environment types the Python extension currently has built-in support for. Note this list is expected to shrink
228+
* once tools have their own separate extensions.
227229
*/
228230
export type KnownEnvironmentTypes = 'VirtualEnv' | 'Conda' | 'Unknown';
229231

230232
/**
231233
* Carries bitness for an environment.
232234
*/
233-
export type Architecture = 'x86' | 'x64' | 'Unknown';
235+
export type Bitness = '64-bit' | '32-bit' | 'Unknown';
234236

235237
/**
236238
* The possible Python release levels.

0 commit comments

Comments
 (0)