forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
92 lines (74 loc) · 2.45 KB
/
types.ts
File metadata and controls
92 lines (74 loc) · 2.45 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import { Uri } from 'vscode';
export const IOutputChannel = Symbol('IOutputChannel');
export const IDocumentSymbolProvider = Symbol('IDocumentSymbolProvider');
export const IsWindows = Symbol('IS_WINDOWS');
export const Is64Bit = Symbol('Is64Bit');
export const IDisposableRegistry = Symbol('IDiposableRegistry');
export const IMemento = Symbol('IGlobalMemento');
export const GLOBAL_MEMENTO = Symbol('IGlobalMemento');
export const WORKSPACE_MEMENTO = Symbol('IWorkspaceMemento');
export interface IPersistentState<T> {
value: T;
}
export const IPersistentStateFactory = Symbol('IPersistentStateFactory');
export interface IPersistentStateFactory {
createGlobalPersistentState<T>(key: string, defaultValue: T): IPersistentState<T>;
createWorkspacePersistentState<T>(key: string, defaultValue: T): IPersistentState<T>;
}
export type ExecutionInfo = {
execPath?: string;
moduleName?: string;
args: string[];
product?: Product;
};
export interface IErrorHandler {
handleError(error: Error, resource: Uri, execInfo: ExecutionInfo): Promise<boolean>;
}
export const IErrorHandlerFactory = Symbol('IErrorHandlerFactory');
export interface IErrorHandlerFactory {
create(product: Product): IErrorHandler;
}
export const ILogger = Symbol('ILogger');
export interface ILogger {
logError(message: string, error?: Error);
logWarning(message: string, error?: Error);
}
export enum InstallerResponse {
Installed,
Disabled,
Ignore
}
export enum Product {
pytest = 1,
nosetest = 2,
pylint = 3,
flake8 = 4,
pep8 = 5,
pylama = 6,
prospector = 7,
pydocstyle = 8,
yapf = 9,
autopep8 = 10,
mypy = 11,
unittest = 12,
ctags = 13,
rope = 14
}
export enum ModuleNamePurpose {
install = 1,
run = 2
}
export const IInstaller = Symbol('IInstaller');
export interface IInstaller {
promptToInstall(product: Product, resource?: Uri): Promise<InstallerResponse>;
install(product: Product, resource?: Uri): Promise<InstallerResponse>;
isInstalled(product: Product, resource?: Uri): Promise<boolean | undefined>;
disableLinter(product: Product, resource?: Uri): Promise<void>;
translateProductToModuleName(product: Product, purpose: ModuleNamePurpose): string;
}
export const IPathUtils = Symbol('IPathUtils');
export interface IPathUtils {
getPathVariableName(): 'Path' | 'PATH';
}