Skip to content

Commit cf093e4

Browse files
author
Kartik Raj
committed
Some updates
1 parent 5369c50 commit cf093e4

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed

src/client/proposedApi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ function convertCompleteEnvInfo(env: PythonEnvInfo): ResolvedEnvironment {
159159
? {
160160
type: env.kind === PythonEnvKind.Conda ? 'Conda' : 'VirtualEnv',
161161
name: env.name,
162-
folderPath: env.location,
163-
workspaceFolder: env.searchLocation,
162+
path: env.location,
163+
workspaceFolderPath: env.searchLocation?.fsPath,
164164
source: [env.kind],
165165
}
166166
: undefined,

src/client/proposedApiTypes.ts

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ interface IEnvironmentAPI {
1919
* python binary in a multi-root scenario. If resource is `undefined` then the API
2020
* returns what ever is set for the workspace.
2121
*
22-
* @param resource : Uri of a file or workspace
22+
* @param resource : Uri of a file or workspace folder.
2323
*/
2424
getActiveEnvironment(resource?: Resource): Promise<ResolvedEnvironment | undefined>;
2525
/**
@@ -31,8 +31,7 @@ interface IEnvironmentAPI {
3131
* Sets the active environment path for the python extension for the resource. Configuration target
3232
* will always be the workspace folder.
3333
* @param environment : Full path to environment folder or python executable for the environment. Can also pass the environment itself.
34-
* @param resource : [optional] Uri of a file ro workspace to scope to a particular workspace
35-
* folder.
34+
* @param resource : [optional] File or workspace to scope to a particular workspace folder.
3635
*/
3736
setActiveEnvironment(environment: Environment | UniquePathType, resource?: Resource): Promise<void>;
3837
/**
@@ -45,8 +44,6 @@ interface IEnvironmentLocatorAPI {
4544
/**
4645
* Carries environments found by the extension at the time of fetching the property. To get complete list
4746
* `await` on promise returned by {@link waitOnRefresh()}.
48-
*
49-
* Only returns an environment if the final type, name and environment path is known.
5047
*/
5148
environments: readonly Environment[] | undefined;
5249
/**
@@ -77,7 +74,7 @@ interface IEnvironmentLocatorAPI {
7774
}
7875

7976
/**
80-
* Details about the environment. Note the type, name and environment path is known.
77+
* Details about the environment. Note the environment path, type and name never changes over time.
8178
*/
8279
export interface Environment {
8380
pathID: UniquePathType;
@@ -99,12 +96,12 @@ export interface Environment {
9996
sysPrefix: string | undefined;
10097
};
10198
/**
102-
* Carries details if it is an environment, otherwise `undefined` in case of global interpreters or something else.
99+
* Carries details if it is an environment, otherwise `undefined` in case of global interpreters and others.
103100
*/
104101
environment:
105102
| {
106103
/**
107-
* Type of the environment. This never changes over time.
104+
* Type of the environment.
108105
*/
109106
type: EnvType;
110107
/**
@@ -114,20 +111,20 @@ export interface Environment {
114111
/**
115112
* Path to the environment folder.
116113
*/
117-
folderPath: string;
114+
path: string;
118115
/**
119116
* Any specific workspace folder this environment is created for.
120117
*/
121-
workspaceFolder: Uri | undefined;
118+
workspaceFolderPath: string | undefined;
122119
/**
123-
* Tools/Plugins which created the environment or where it came from in the order.
120+
* Tools/Plugins which created the environment or where it came from.
124121
* First value corresponds to the primary source, which never changes over time.
125122
*/
126123
source: EnvSource[];
127124
}
128125
| undefined;
129126
/**
130-
* Carries Python version information.
127+
* Carries Python version information known at this moment.
131128
*/
132129
version: StandardVersionInfo & {
133130
/**

0 commit comments

Comments
 (0)