Skip to content

Commit

Permalink
Simplify imports (#11148)
Browse files Browse the repository at this point in the history
* Move kernel ranking to preferred controller component

* remove empty ctor

* lint

* Simplify imports
  • Loading branch information
rebornix authored Aug 18, 2022
1 parent cb203d6 commit 063cda0
Show file tree
Hide file tree
Showing 18 changed files with 21 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import { MockJupyterSettings } from '../mockJupyterSettings';
import { MockEditor } from '../mockTextEditor';
import { createDocument } from './helpers';
import { disposeAllDisposables } from '../../../platform/common/helpers';
import { IKernel, IKernelProvider } from '../../../platform/../kernels/types';
import { IKernel, IKernelProvider } from '../../../kernels/types';
import { InteractiveCellResultError } from '../../../platform/errors/interactiveCellResultError';
import { ICodeWatcher, IGeneratedCodeStorageFactory } from '../../../interactive-window/editor-integration/types';
import { IInteractiveWindowProvider, IInteractiveWindow } from '../../../interactive-window/types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { EXTENSION_ROOT_DIR_FOR_TESTS } from '../../constants.node';
import { initialize } from '../../initialize.node';
import { HoverProvider } from '../../../interactive-window/editor-integration/hoverProvider';
import { disposeAllDisposables } from '../../../platform/common/helpers';
import { IKernelProvider } from '../../../platform/../kernels/types';
import { IKernelProvider } from '../../../kernels/types';
import { IVSCodeNotebook } from '../../../platform/common/application/types';
import { IInteractiveWindowProvider } from '../../../interactive-window/types';
import { IJupyterVariables } from '../../../kernels/variables/types';
Expand Down
2 changes: 1 addition & 1 deletion src/test/datascience/errorHandler.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
KernelConnectionMetadata,
KernelInterpreterDependencyResponse,
RemoteKernelSpecConnectionMetadata
} from '../../platform/../kernels/types';
} from '../../kernels/types';
import { PythonEnvironment, EnvironmentType } from '../../platform/pythonEnvironments/info';
import { JupyterInterpreterService } from '../../kernels/jupyter/interpreter/jupyterInterpreterService.node';
import { DataScienceErrorHandler } from '../../kernels/errors/kernelErrorHandler';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { expect } from 'chai';
import { anything, instance, mock, when } from 'ts-mockito';
import * as vscode from 'vscode';
import { PythonExtensionChecker } from '../../../platform/api/pythonApi';
import { IJupyterKernelConnectionSession, KernelConnectionMetadata } from '../../../platform/../kernels/types';
import { IJupyterKernelConnectionSession, KernelConnectionMetadata } from '../../../kernels/types';
import { NotebookProvider } from '../../../kernels/jupyter/launcher/notebookProvider';
import { DisplayOptions } from '../../../kernels/displayOptions';
import { IJupyterNotebookProvider, IServerConnectionType } from '../../../kernels/jupyter/types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { traceInfo, traceInfoIfCI } from '../../platform/logging';
import { getDisplayPath } from '../../platform/common/platform/fs-paths';
import { IDisposable, InteractiveWindowMode } from '../../platform/common/types';
import { InteractiveWindowProvider } from '../../interactive-window/interactiveWindowProvider';
import { IKernelProvider } from '../../platform/../kernels/types';
import { IKernelProvider } from '../../kernels/types';
import {
captureScreenShot,
createEventHandler,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ import { HttpClient } from '../../../platform/common/net/httpClient';
import { PersistentState, PersistentStateFactory } from '../../../platform/common/persistentState';
import { FileSystem } from '../../../platform/common/platform/fileSystem.node';
import { IConfigurationService, IExtensionContext, IJupyterSettings, ReadWrite } from '../../../platform/common/types';
import {
IKernel,
LocalKernelSpecConnectionMetadata,
RemoteKernelSpecConnectionMetadata
} from '../../../platform/../kernels/types';
import { IKernel, LocalKernelSpecConnectionMetadata, RemoteKernelSpecConnectionMetadata } from '../../../kernels/types';
import { IPyWidgetScriptSourceProvider } from '../../../notebooks/controllers/ipywidgets/scriptSourceProvider/ipyWidgetScriptSourceProvider';
import { LocalWidgetScriptSourceProvider } from '../../../notebooks/controllers/ipywidgets/scriptSourceProvider/localWidgetScriptSourceProvider.node';
import { RemoteWidgetScriptSourceProvider } from '../../../notebooks/controllers/ipywidgets/scriptSourceProvider/remoteWidgetScriptSourceProvider';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { assert } from 'chai';
import { anything, instance, mock, when } from 'ts-mockito';
import { Uri } from 'vscode';
import { IKernel } from '../../../platform/../kernels/types';
import { IKernel } from '../../../kernels/types';
import { LocalWidgetScriptSourceProvider } from '../../../notebooks/controllers/ipywidgets/scriptSourceProvider/localWidgetScriptSourceProvider.node';
import {
ILocalResourceUriConverter,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { assert } from 'chai';
import { anything, instance, mock, when } from 'ts-mockito';
import { Uri } from 'vscode';
import { IJupyterKernelSpec, IKernel, RemoteKernelConnectionMetadata } from '../../../platform/../kernels/types';
import { IJupyterKernelSpec, IKernel, RemoteKernelConnectionMetadata } from '../../../kernels/types';
import { IWidgetScriptSourceProvider } from '../../../notebooks/controllers/ipywidgets/types';
import {
IIPyWidgetScriptManager,
Expand Down
2 changes: 1 addition & 1 deletion src/test/datascience/jupyter/jupyterSession.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
ISessionWithSocket,
KernelConnectionMetadata,
LiveKernelModel
} from '../../../platform/../kernels/types';
} from '../../../kernels/types';
import { MockOutputChannel } from '../../mockClasses';
import { JupyterKernelService } from '../../../kernels/jupyter/jupyterKernelService.node';
import { JupyterSession } from '../../../kernels/jupyter/session/jupyterSession';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import * as sinon from 'sinon';
import { commands, Memento, workspace, window, Uri, NotebookCell, NotebookDocument, NotebookCellKind } from 'vscode';
import { IPythonApiProvider } from '../../../../platform/api/types';
import { ICommandManager, IVSCodeNotebook } from '../../../../platform/common/application/types';
import { Kernel } from '../../../../platform/../kernels/kernel';
import { Kernel } from '../../../../kernels/kernel';
import { getDisplayPath } from '../../../../platform/common/platform/fs-paths';
import {
GLOBAL_MEMENTO,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { assert } from 'chai';
import { anything, instance, mock, when, verify, capture } from 'ts-mockito';
import { FileSystem } from '../../../../platform/common/platform/fileSystem.node';
import { IFileSystemNode } from '../../../../platform/common/platform/types.node';
import { KernelDependencyService } from '../../../../platform/../kernels/kernelDependencyService.node';
import { IKernelDependencyService, LocalKernelConnectionMetadata } from '../../../../platform/../kernels/types';
import { KernelDependencyService } from '../../../../kernels/kernelDependencyService.node';
import { IKernelDependencyService, LocalKernelConnectionMetadata } from '../../../../kernels/types';
import { EnvironmentType } from '../../../../platform/pythonEnvironments/info';
import { EXTENSION_ROOT_DIR } from '../../../../platform/constants.node';
import * as path from '../../../../platform/vscode-path/path';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import { anything, instance, mock, verify, when } from 'ts-mockito';
import { CancellationTokenSource, Memento, NotebookDocument, NotebookEditor, Uri } from 'vscode';
import { IApplicationShell, ICommandManager, IVSCodeNotebook } from '../../../../platform/common/application/types';
import { Common, DataScience } from '../../../../platform/common/utils/localize';
import { createInterpreterKernelSpec } from '../../../../platform/../kernels/helpers';
import { KernelDependencyService } from '../../../../platform/../kernels/kernelDependencyService.node';
import { createInterpreterKernelSpec } from '../../../../kernels/helpers';
import { KernelDependencyService } from '../../../../kernels/kernelDependencyService.node';
import {
IKernelProvider,
KernelInterpreterDependencyResponse,
PythonKernelConnectionMetadata
} from '../../../../platform/../kernels/types';
} from '../../../../kernels/types';
import { IServiceContainer } from '../../../../platform/ioc/types';
import { EnvironmentType } from '../../../../platform/pythonEnvironments/info';
import { IInstaller, Product, InstallerResponse } from '../../../../kernels/installer/types';
Expand Down
2 changes: 1 addition & 1 deletion src/test/datascience/notebook.functional.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ suite('Dummy9', () => {
// import { ExportFormat } from '../../platform/datascience/export/types';
// import { getDefaultInteractiveIdentity } from '../../platform/datascience/interactive-window/identity';
// import { getMessageForLibrariesNotInstalled } from '../../platform/datascience/jupyter/interpreter/jupyterInterpreterDependencyService';
// import { JupyterKernelPromiseFailedError } from '../../platform/../kernels/jupyterKernelPromiseFailedError';
// import { JupyterKernelPromiseFailedError } from '../../kernels/jupyterKernelPromiseFailedError';
// import { HostJupyterExecution } from '../../platform/datascience/jupyter/liveshare/hostJupyterExecution';
// import { HostJupyterNotebook } from '../../platform/datascience/jupyter/liveshare/hostJupyterNotebook';
// import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
// } from './helper';
// import { ProductNames } from '../../../platform/common/installer/productNames';
// import { INotebookControllerManager } from '../../../notebooks/types';
// import { IKernelProvider } from '../../../platform/../kernels/types';
// import { IKernelProvider } from '../../../kernels/types';
// import {
// IJupyterKernelConnectionSession,
// INotebook,
Expand Down
2 changes: 1 addition & 1 deletion src/test/datascience/notebook/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ import {
IsWebExtension
} from '../../../platform/common/types';
import { createDeferred, sleep } from '../../../platform/common/utils/async';
import { IKernelProvider } from '../../../platform/../kernels/types';
import { IKernelProvider } from '../../../kernels/types';
import { noop } from '../../core';
import { closeActiveWindows, isInsiders } from '../../initialize';
import { DebugProtocol } from 'vscode-debugprotocol';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { IApplicationShell, ICommandManager, IVSCodeNotebook } from '../../../pl
import { traceInfo } from '../../../platform/logging';
import { IConfigurationService, IDisposable, IJupyterSettings, ReadWrite } from '../../../platform/common/types';
import { noop } from '../../../platform/common/utils/misc';
import { IKernelProvider } from '../../../platform/../kernels/types';
import { IKernelProvider } from '../../../kernels/types';
import { captureScreenShot, createEventHandler, IExtensionTestApi, sleep, waitForCondition } from '../../common.node';
import { IS_NON_RAW_NATIVE_TEST, IS_REMOTE_NATIVE_TEST } from '../../constants.node';
import { initialize } from '../../initialize.node';
Expand Down
2 changes: 1 addition & 1 deletion src/test/datascience/notebook/kernelCrashes.vscode.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {
} from './helper.node';
import { EXTENSION_ROOT_DIR_FOR_TESTS, IS_NON_RAW_NATIVE_TEST, IS_REMOTE_NATIVE_TEST } from '../../constants.node';
import dedent from 'dedent';
import { IKernelProvider } from '../../../platform/../kernels/types';
import { IKernelProvider } from '../../../kernels/types';
import { createDeferred } from '../../../platform/common/utils/async';
import { sleep } from '../../core';
import { getDisplayNameOrNameOfKernelConnection } from '../../../kernels/helpers';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { IPythonExtensionChecker } from '../../../platform/api/types';
import { IVSCodeNotebook } from '../../../platform/common/application/types';
import { ProcessService } from '../../../platform/common/process/proc.node';
import { IConfigurationService, IDisposable } from '../../../platform/common/types';
import { IKernelProvider, isLocalConnection, isRemoteConnection } from '../../../platform/../kernels/types';
import { IKernelProvider, isLocalConnection, isRemoteConnection } from '../../../kernels/types';
import { IInterpreterService } from '../../../platform/interpreter/contracts';
import {
getInterpreterHash,
Expand Down

0 comments on commit 063cda0

Please sign in to comment.