forked from microsoft/vscode-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathautoSelector.ts
More file actions
43 lines (35 loc) · 1.66 KB
/
autoSelector.ts
File metadata and controls
43 lines (35 loc) · 1.66 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
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
'use strict';
import { injectable } from 'inversify';
import { Event, EventEmitter } from 'vscode';
import { Resource } from '../../client/common/types';
import {
IInterpreterAutoSelectionService,
IInterpreterAutoSelectionProxyService,
} from '../../client/interpreter/autoSelection/types';
import { PythonEnvironment } from '../../client/pythonEnvironments/info';
@injectable()
export class MockAutoSelectionService
implements IInterpreterAutoSelectionService, IInterpreterAutoSelectionProxyService {
// eslint-disable-next-line class-methods-use-this
public async setWorkspaceInterpreter(_resource: Resource, _interpreter: PythonEnvironment): Promise<void> {
return Promise.resolve();
}
// eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-empty-function
public async setGlobalInterpreter(_interpreter: PythonEnvironment): Promise<void> {}
// eslint-disable-next-line class-methods-use-this
get onDidChangeAutoSelectedInterpreter(): Event<void> {
return new EventEmitter<void>().event;
}
// eslint-disable-next-line class-methods-use-this
public autoSelectInterpreter(_resource: Resource): Promise<void> {
return Promise.resolve();
}
// eslint-disable-next-line class-methods-use-this
public getAutoSelectedInterpreter(_resource: Resource): PythonEnvironment | undefined {
return undefined;
}
// eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-empty-function
public registerInstance(_instance: IInterpreterAutoSelectionProxyService): void {}
}