Skip to content

Commit bc59a7d

Browse files
Fix linting in APIs (#20623)
Fix lint in api.ts
1 parent 34c54f4 commit bc59a7d

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ src/client/interpreter/helpers.ts
148148
src/client/interpreter/virtualEnvs/condaInheritEnvPrompt.ts
149149
src/client/interpreter/display/index.ts
150150

151-
src/client/api.ts
152151
src/client/extension.ts
153152
src/client/sourceMapSupport.ts
154153
src/client/startupTelemetry.ts

src/client/api.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/no-explicit-any */
12
// Copyright (c) Microsoft Corporation. All rights reserved.
23
// Licensed under the MIT License.
34

@@ -16,14 +17,15 @@ import { getDebugpyLauncherArgs, getDebugpyPackagePath } from './debugger/extens
1617
import { IInterpreterService } from './interpreter/contracts';
1718
import { IServiceContainer, IServiceManager } from './ioc/types';
1819
import { JupyterExtensionIntegration } from './jupyter/jupyterIntegration';
20+
import { IDataViewerDataProvider, IJupyterUriProvider } from './jupyter/types';
1921
import { traceError } from './logging';
2022
import { IDiscoveryAPI } from './pythonEnvironments/base/locator';
2123
import { buildEnvironmentApi } from './environmentApi';
2224
import { ApiForPylance } from './pylanceApi';
2325
import { getTelemetryReporter } from './telemetry';
2426

2527
export function buildApi(
26-
ready: Promise<any>,
28+
ready: Promise<void>,
2729
serviceManager: IServiceManager,
2830
serviceContainer: IServiceContainer,
2931
discoveryApi: IDiscoveryAPI,
@@ -89,7 +91,7 @@ export function buildApi(
8991
async getRemoteLauncherCommand(
9092
host: string,
9193
port: number,
92-
waitUntilDebuggerAttaches: boolean = true,
94+
waitUntilDebuggerAttaches = true,
9395
): Promise<string[]> {
9496
return getDebugpyLauncherArgs({
9597
host,
@@ -104,7 +106,7 @@ export function buildApi(
104106
settings: {
105107
onDidChangeExecutionDetails: interpreterService.onDidChangeInterpreterConfiguration,
106108
getExecutionDetails(resource?: Resource) {
107-
const pythonPath = configurationService.getSettings(resource).pythonPath;
109+
const { pythonPath } = configurationService.getSettings(resource);
108110
// If pythonPath equals an empty string, no interpreter is set.
109111
return { execCommand: pythonPath === '' ? undefined : [pythonPath] };
110112
},
@@ -114,10 +116,10 @@ export function buildApi(
114116
datascience: {
115117
registerRemoteServerProvider: jupyterIntegration
116118
? jupyterIntegration.registerRemoteServerProvider.bind(jupyterIntegration)
117-
: (noop as any),
119+
: ((noop as unknown) as (serverProvider: IJupyterUriProvider) => void),
118120
showDataViewer: jupyterIntegration
119121
? jupyterIntegration.showDataViewer.bind(jupyterIntegration)
120-
: (noop as any),
122+
: ((noop as unknown) as (dataProvider: IDataViewerDataProvider, title: string) => Promise<void>),
121123
},
122124
pylance: {
123125
createClient: (...args: any[]): BaseLanguageClient => {

0 commit comments

Comments
 (0)