mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-27 17:23:21 -05:00
Remove unnecessary OutputChannel reference from PythonPathLookup class. (#13970)
This commit is contained in:
@@ -8,7 +8,6 @@ import * as azdata from 'azdata';
|
||||
import { BasePage } from './basePage';
|
||||
import * as nls from 'vscode-nls';
|
||||
import { JupyterServerInstallation } from '../../jupyter/jupyterServerInstallation';
|
||||
import { PythonPathInfo } from '../pythonPathLookup';
|
||||
import * as utils from '../../common/utils';
|
||||
|
||||
const localize = nls.loadMessageBundle();
|
||||
@@ -160,10 +159,9 @@ export class ConfigurePathPage extends BasePage {
|
||||
this.instance.wizard.nextButton.enabled = false;
|
||||
this.pythonDropdownLoader.loading = true;
|
||||
try {
|
||||
let pythonPaths: PythonPathInfo[];
|
||||
let dropdownValues: azdata.CategoryValue[];
|
||||
if (useExistingPython) {
|
||||
pythonPaths = await this.model.pythonPathsPromise;
|
||||
let pythonPaths = await this.model.pythonPathLookup.getSuggestions();
|
||||
if (pythonPaths && pythonPaths.length > 0) {
|
||||
dropdownValues = pythonPaths.map(path => {
|
||||
return {
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
import * as nls from 'vscode-nls';
|
||||
import * as azdata from 'azdata';
|
||||
import * as vscode from 'vscode';
|
||||
import { BasePage } from './basePage';
|
||||
import { ConfigurePathPage } from './configurePathPage';
|
||||
import { PickPackagesPage } from './pickPackagesPage';
|
||||
@@ -13,7 +12,7 @@ import { JupyterServerInstallation, PythonPkgDetails, PythonInstallSettings } fr
|
||||
import * as utils from '../../common/utils';
|
||||
import { promises as fs } from 'fs';
|
||||
import { Deferred } from '../../common/promise';
|
||||
import { PythonPathInfo, PythonPathLookup } from '../pythonPathLookup';
|
||||
import { PythonPathLookup } from '../pythonPathLookup';
|
||||
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
@@ -21,7 +20,7 @@ export interface ConfigurePythonModel {
|
||||
kernelName: string;
|
||||
pythonLocation: string;
|
||||
useExistingPython: boolean;
|
||||
pythonPathsPromise: Promise<PythonPathInfo[]>;
|
||||
pythonPathLookup: PythonPathLookup;
|
||||
packagesToInstall: PythonPkgDetails[];
|
||||
installation: JupyterServerInstallation;
|
||||
}
|
||||
@@ -35,11 +34,9 @@ export class ConfigurePythonWizard {
|
||||
private model: ConfigurePythonModel;
|
||||
|
||||
private _setupComplete: Deferred<void>;
|
||||
private pythonPathsPromise: Promise<PythonPathInfo[]>;
|
||||
|
||||
constructor(private jupyterInstallation: JupyterServerInstallation, private readonly _outputChannel: vscode.OutputChannel) {
|
||||
constructor(private jupyterInstallation: JupyterServerInstallation) {
|
||||
this._setupComplete = new Deferred<void>();
|
||||
this.pythonPathsPromise = (new PythonPathLookup(this._outputChannel)).getSuggestions();
|
||||
}
|
||||
|
||||
public get wizard(): azdata.window.Wizard {
|
||||
@@ -53,7 +50,7 @@ export class ConfigurePythonWizard {
|
||||
public async start(kernelName?: string, rejectOnCancel?: boolean): Promise<void> {
|
||||
this.model = <ConfigurePythonModel>{
|
||||
kernelName: kernelName,
|
||||
pythonPathsPromise: this.pythonPathsPromise,
|
||||
pythonPathLookup: new PythonPathLookup(),
|
||||
installation: this.jupyterInstallation,
|
||||
pythonLocation: JupyterServerInstallation.getPythonPathSetting(),
|
||||
useExistingPython: JupyterServerInstallation.getExistingPythonSetting()
|
||||
|
||||
Reference in New Issue
Block a user