Skip to content

Commit e93d221

Browse files
Add ExtensionLocators.
1 parent c995d66 commit e93d221

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
@@ -30,6 +30,19 @@ import { GetInterpreterLocatorOptions } from './types';
3030
// tslint:disable-next-line:no-require-imports no-var-requires
3131
const flatten = require('lodash/flatten') as typeof import('lodash/flatten');
3232

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

3548
interface IWorkspaceFolders {

0 commit comments

Comments
 (0)