Skip to content

Commit b42b8d6

Browse files
fix linting
1 parent 4612510 commit b42b8d6

File tree

9 files changed

+10
-29
lines changed

9 files changed

+10
-29
lines changed

src/extension/common/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export namespace Commands {
3535
export const ViewOutput = 'debugpy.viewOutput';
3636
export const ClearStorage = 'debugpy.clearCacheAndReload';
3737
export const Enable_SourceMap_Support = 'debugpy.enableSourceMapSupport';
38-
export const SelectDebugConfig ='debugpy.SelectAndInsertDebugConfiguration'
38+
export const SelectDebugConfig = 'debugpy.SelectAndInsertDebugConfiguration';
3939
export const Set_Interpreter = 'python.setInterpreter';
4040
export const GetSelectedInterpreterPath = 'python.interpreterPath';
4141
}

src/extension/common/persistentState.ts

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@
66
import { Memento } from 'vscode';
77
import { Commands } from './constants';
88
import { traceError, traceVerbose, traceWarn } from './log/logging';
9-
import {
10-
IExtensionContext,
11-
IPersistentState,
12-
IPersistentStateFactory,
13-
} from './types';
9+
import { IExtensionContext, IPersistentState, IPersistentStateFactory } from './types';
1410
import { cache } from './utils/decorators';
1511
import { noop } from './utils/misc';
1612
import { executeCommand, registerCommand } from './vscodeapi';
@@ -71,20 +67,16 @@ export type KeysStorage = { key: string; defaultValue: unknown };
7167

7268
export class PersistentStateFactory implements IPersistentStateFactory {
7369
public readonly supportedWorkspaceTypes = { untrustedWorkspace: false, virtualWorkspace: true };
74-
private globalState : Memento;
70+
private globalState: Memento;
7571
private workspaceState: Memento;
76-
public readonly _globalKeysStorage :PersistentState<KeysStorage[]>;
72+
public readonly _globalKeysStorage: PersistentState<KeysStorage[]>;
7773

7874
public readonly _workspaceKeysStorage: PersistentState<KeysStorage[]>;
7975

80-
constructor(globalState: Memento,workspaceState: Memento) {
76+
constructor(globalState: Memento, workspaceState: Memento) {
8177
this.globalState = globalState;
8278
this.workspaceState = workspaceState;
83-
this._globalKeysStorage = new PersistentState<KeysStorage[]>(
84-
this.globalState,
85-
GLOBAL_PERSISTENT_KEYS,
86-
[],
87-
);
79+
this._globalKeysStorage = new PersistentState<KeysStorage[]>(this.globalState, GLOBAL_PERSISTENT_KEYS, []);
8880
this._workspaceKeysStorage = new PersistentState<KeysStorage[]>(
8981
this.workspaceState,
9082
WORKSPACE_PERSISTENT_KEYS,

src/extension/common/settings.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,13 @@ export async function getWorkspaceSettings(
5757
const workspaceSetting = {
5858
workspace: workspace.uri.toString(),
5959
interpreter: (interpreter ?? []).map((s) => resolveWorkspace(workspace, s)),
60-
envFile: config.get<string>('envFile', '')
60+
envFile: config.get<string>('envFile', ''),
6161
};
6262
return workspaceSetting;
6363
}
6464

6565
export function checkIfConfigurationChanged(e: ConfigurationChangeEvent, namespace: string): boolean {
66-
const settings = [
67-
`${namespace}.interpreter`,
68-
`${namespace}.envFile`,
69-
];
66+
const settings = [`${namespace}.interpreter`, `${namespace}.envFile`];
7067
const changed = settings.map((s) => e.affectsConfiguration(s));
7168
return changed.includes(true);
7269
}

src/extension/common/types.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ export interface IDisposable {
1414
export const IDisposableRegistry = Symbol('IDisposableRegistry');
1515
export type IDisposableRegistry = IDisposable[];
1616

17-
1817
export interface IPersistentState<T> {
1918
/**
2019
* Storage is exposed in this type to make sure folks always use persistent state
@@ -32,6 +31,5 @@ export interface IPersistentStateFactory {
3231
createWorkspacePersistentState<T>(key: string, defaultValue?: T, expiryDurationMs?: number): IPersistentState<T>;
3332
}
3433

35-
3634
export const IExtensionContext = Symbol('ExtensionContext');
3735
export interface IExtensionContext extends ExtensionContext {}

src/extension/common/variables/environment.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { traceError } from '../log/logging';
99
import { getSearchPathEnvVarNames } from '../utils/exec';
1010
import { EnvironmentVariables } from './types';
1111

12-
1312
export async function parseFile(
1413
filePath?: string,
1514
baseVars?: EnvironmentVariables,
@@ -92,7 +91,6 @@ export function appendPaths(
9291
return vars;
9392
}
9493

95-
9694
export function parseEnvFile(lines: string | Buffer, baseVars?: EnvironmentVariables): EnvironmentVariables {
9795
const globalVars = baseVars ? baseVars : {};
9896
const vars: EnvironmentVariables = {};

src/extension/debugger/attachQuickPick/provider.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,7 @@ export class AttachProcessProvider implements IAttachProcessProvider {
7272

7373
const customEnvVars = await getEnvironmentVariables();
7474
const output = await plainExec(processCmd.command, processCmd.args, { throwOnStdErr: true }, customEnvVars);
75-
logProcess(processCmd.command, processCmd.args, { throwOnStdErr: true })
76-
77-
75+
logProcess(processCmd.command, processCmd.args, { throwOnStdErr: true });
7876

7977
return osType === OSType.Windows
8078
? WmicProcessParser.parseProcesses(output.stdout)

src/extension/debugger/configuration/resolvers/helper.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ export async function getDebugEnvironmentVariables(args: LaunchRequestArguments)
7070
return env;
7171
}
7272

73-
7473
export function getProgram(): string | undefined {
7574
const activeTextEditor = getActiveTextEditor();
7675
if (activeTextEditor && activeTextEditor.document.languageId === PYTHON_LANGUAGE) {

src/extension/extension.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ export async function activate(context: IExtensionContext): Promise<void> {
3333
} catch (ex) {
3434
traceError('sendDebugpySuccessActivationTelemetry() failed.', ex);
3535
}
36-
3736
}
3837

3938
// this method is called when your extension is deactivated

src/extension/extensionInit.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import { ignoreErrors } from './common/promiseUtils';
3535
export async function registerDebugger(context: IExtensionContext): Promise<void> {
3636
const childProcessAttachService = new ChildProcessAttachService();
3737
const childProcessAttachEventHandler = new ChildProcessAttachEventHandler(childProcessAttachService);
38-
38+
3939
context.subscriptions.push(
4040
debug.onDidReceiveDebugSessionCustomEvent((e) => {
4141
ignoreErrors(childProcessAttachEventHandler.handleCustomEvent(e));

0 commit comments

Comments
 (0)