forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
types.ts
51 lines (44 loc) · 1.82 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import { ConfigurationTarget, Disposable, QuickPickItem, Uri } from 'vscode';
import { Resource } from '../../common/types';
import { PythonEnvironment } from '../../pythonEnvironments/info';
export interface IPythonPathUpdaterService {
updatePythonPath(pythonPath: string | undefined): Promise<void>;
}
export const IPythonPathUpdaterServiceFactory = Symbol('IPythonPathUpdaterServiceFactory');
export interface IPythonPathUpdaterServiceFactory {
getGlobalPythonPathConfigurationService(): IPythonPathUpdaterService;
getWorkspacePythonPathConfigurationService(wkspace: Uri): IPythonPathUpdaterService;
getWorkspaceFolderPythonPathConfigurationService(workspaceFolder: Uri): IPythonPathUpdaterService;
}
export const IPythonPathUpdaterServiceManager = Symbol('IPythonPathUpdaterServiceManager');
export interface IPythonPathUpdaterServiceManager {
updatePythonPath(
pythonPath: string | undefined,
configTarget: ConfigurationTarget,
trigger: 'ui' | 'shebang' | 'load',
wkspace?: Uri,
): Promise<void>;
}
export const IInterpreterSelector = Symbol('IInterpreterSelector');
export interface IInterpreterSelector extends Disposable {
getSuggestions(resource: Resource, ignoreCache?: boolean): Promise<IInterpreterQuickPickItem[]>;
}
export interface IInterpreterQuickPickItem extends QuickPickItem {
path: string;
/**
* The interpreter related to this quickpick item.
*
* @type {PythonEnvironment}
* @memberof IInterpreterQuickPickItem
*/
interpreter: PythonEnvironment;
}
export interface IFindInterpreterQuickPickItem {
label: string;
detail: string;
alwaysShow: boolean;
}
export const IInterpreterComparer = Symbol('IInterpreterComparer');
export interface IInterpreterComparer {
compare(a: PythonEnvironment, b: PythonEnvironment): number;
}