Skip to content

Commit 2a1d13c

Browse files
Add ExtensionLocators.
1 parent 545209b commit 2a1d13c

File tree

1 file changed

+13
-0
lines changed
  • src/client/pythonEnvironments/discovery/locators

1 file changed

+13
-0
lines changed

src/client/pythonEnvironments/discovery/locators/index.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,19 @@ import { GetInterpreterLocatorOptions } from './types';
2828
// tslint:disable-next-line:no-require-imports no-var-requires
2929
const flatten = require('lodash/flatten') as typeof import('lodash/flatten');
3030

31+
/**
32+
* A wrapper around all locators used by the extension.
33+
*/
34+
export class ExtensionLocators extends Locators {
35+
constructor(
36+
// These are all wrapped up together.
37+
nonWorkspace: ILocator[],
38+
workspace: ILocator
39+
) {
40+
super([...nonWorkspace, workspace]);
41+
}
42+
}
43+
3144
type WorkspaceLocatorFactory = (root: Uri) => ILocator[];
3245

3346
interface IWorkspaceFolders {

0 commit comments

Comments
 (0)