Skip to content

Commit

Permalink
Remove inversify dependency (#452)
Browse files Browse the repository at this point in the history
* Remove `inversify` dependency

* Remove dependabot

* More fixes
  • Loading branch information
karthiknadig authored Nov 13, 2024
1 parent b0f1dc7 commit a0bc66d
Show file tree
Hide file tree
Showing 10 changed files with 64 additions and 148 deletions.
138 changes: 55 additions & 83 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"publisher": "ms-python",
"enabledApiProposals": [
"portsAttributes",
"contribIssueReporter",
"debugVisualization",
"contribViewsWelcome"
],
Expand Down Expand Up @@ -594,10 +593,8 @@
"@vscode/python-extension": "^1.0.5",
"fs-extra": "^11.2.0",
"iconv-lite": "^0.6.3",
"inversify": "^6.0.1",
"jsonc-parser": "^3.2.0",
"lodash": "^4.17.21",
"reflect-metadata": "^0.1.13",
"vscode-languageclient": "^8.0.2"
}
}
7 changes: 0 additions & 7 deletions src/extension/common/promiseUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,3 @@
export function ignoreErrors<T>(promise: Promise<T>) {
return promise.catch(() => {});
}

// if (!String.prototype.format) {
// String.prototype.format = function (this: string) {
// const args = arguments;
// return this.replace(/{(\d+)}/g, (match, number) => (args[number] === undefined ? match : args[number]));
// };
// }
4 changes: 1 addition & 3 deletions src/extension/debugger/adapter/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

'use strict';

import { inject, injectable } from 'inversify';
import * as path from 'path';
import {
DebugAdapterDescriptor,
Expand All @@ -31,9 +30,8 @@ export enum debugStateKeys {
doNotShowAgain = 'doNotShowPython36DebugDeprecatedAgain',
}

@injectable()
export class DebugAdapterDescriptorFactory implements IDebugAdapterDescriptorFactory {
constructor(@inject(IPersistentStateFactory) private persistentState: IPersistentStateFactory) {}
constructor(private persistentState: IPersistentStateFactory) {}

public async createDebugAdapterDescriptor(
session: DebugSession,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

'use strict';

import { inject, injectable, named } from 'inversify';
import { cloneDeep } from 'lodash';
import { CancellationToken, DebugConfiguration, QuickPickItem, WorkspaceFolder } from 'vscode';
import { DebugConfigStrings } from '../../common/utils/localize';
Expand All @@ -21,18 +18,13 @@ import { buildRemoteAttachConfiguration } from './providers/remoteAttach';
import { IDebugConfigurationResolver } from './types';
import { buildFileWithArgsLaunchDebugConfiguration } from './providers/fileLaunchWithArgs';

@injectable()
export class PythonDebugConfigurationService implements IDebugConfigurationService {
private cacheDebugConfig: DebugConfiguration | undefined = undefined;

constructor(
@inject(IDebugConfigurationResolver)
@named('attach')
private readonly attachResolver: IDebugConfigurationResolver<AttachRequestArguments>,
@inject(IDebugConfigurationResolver)
@named('launch')
private readonly launchResolver: IDebugConfigurationResolver<LaunchRequestArguments>,
@inject(IMultiStepInputFactory) private readonly multiStepFactory: IMultiStepInputFactory,
private readonly multiStepFactory: IMultiStepInputFactory,
) {}

public async provideDebugConfigurations(
Expand Down
Loading

0 comments on commit a0bc66d

Please sign in to comment.