From cb6b40fed4504c24bad3e1213d28ca09db30e268 Mon Sep 17 00:00:00 2001 From: Rich Chiodo false Date: Thu, 22 Aug 2024 14:54:24 -0700 Subject: [PATCH] Remove unnecessary @optional decorators --- src/client/activation/extensionSurvey.ts | 6 +++--- src/client/common/variables/environmentVariablesProvider.ts | 4 ++-- src/client/interpreter/virtualEnvs/activatedEnvLaunch.ts | 4 ++-- src/client/interpreter/virtualEnvs/condaInheritEnvPrompt.ts | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/client/activation/extensionSurvey.ts b/src/client/activation/extensionSurvey.ts index 11b581a27252..c5b7c525fea8 100644 --- a/src/client/activation/extensionSurvey.ts +++ b/src/client/activation/extensionSurvey.ts @@ -3,7 +3,7 @@ 'use strict'; -import { inject, injectable, optional } from 'inversify'; +import { inject, injectable } from 'inversify'; import * as querystring from 'querystring'; import { env, UIKind } from 'vscode'; import { IApplicationEnvironment, IApplicationShell } from '../common/application/types'; @@ -37,8 +37,8 @@ export class ExtensionSurveyPrompt implements IExtensionSingleActivationService @inject(IExperimentService) private experiments: IExperimentService, @inject(IApplicationEnvironment) private appEnvironment: IApplicationEnvironment, @inject(IPlatformService) private platformService: IPlatformService, - @optional() private sampleSizePerOneHundredUsers: number = 10, - @optional() private waitTimeToShowSurvey: number = WAIT_TIME_TO_SHOW_SURVEY, + private sampleSizePerOneHundredUsers: number = 10, + private waitTimeToShowSurvey: number = WAIT_TIME_TO_SHOW_SURVEY, ) {} public async activate(): Promise { diff --git a/src/client/common/variables/environmentVariablesProvider.ts b/src/client/common/variables/environmentVariablesProvider.ts index 2524aac21017..14573d2204aa 100644 --- a/src/client/common/variables/environmentVariablesProvider.ts +++ b/src/client/common/variables/environmentVariablesProvider.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { inject, injectable, optional } from 'inversify'; +import { inject, injectable } from 'inversify'; import * as path from 'path'; import { ConfigurationChangeEvent, Disposable, Event, EventEmitter, FileSystemWatcher, Uri } from 'vscode'; import { traceError, traceVerbose } from '../../logging'; @@ -33,7 +33,7 @@ export class EnvironmentVariablesProvider implements IEnvironmentVariablesProvid @inject(IPlatformService) private platformService: IPlatformService, @inject(IWorkspaceService) private workspaceService: IWorkspaceService, @inject(ICurrentProcess) private process: ICurrentProcess, - @optional() private cacheDuration: number = CACHE_DURATION, + private cacheDuration: number = CACHE_DURATION, ) { disposableRegistry.push(this); this.changeEventEmitter = new EventEmitter(); diff --git a/src/client/interpreter/virtualEnvs/activatedEnvLaunch.ts b/src/client/interpreter/virtualEnvs/activatedEnvLaunch.ts index d5470e528ab9..21bcc12b0d06 100644 --- a/src/client/interpreter/virtualEnvs/activatedEnvLaunch.ts +++ b/src/client/interpreter/virtualEnvs/activatedEnvLaunch.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { inject, injectable, optional } from 'inversify'; +import { inject, injectable } from 'inversify'; import { ConfigurationTarget } from 'vscode'; import * as path from 'path'; import { IApplicationShell, IWorkspaceService } from '../../common/application/types'; @@ -29,7 +29,7 @@ export class ActivatedEnvironmentLaunch implements IActivatedEnvironmentLaunch { private readonly pythonPathUpdaterService: IPythonPathUpdaterServiceManager, @inject(IInterpreterService) private readonly interpreterService: IInterpreterService, @inject(IProcessServiceFactory) private readonly processServiceFactory: IProcessServiceFactory, - @optional() public wasSelected: boolean = false, + public wasSelected: boolean = false, ) {} @cache(-1, true) diff --git a/src/client/interpreter/virtualEnvs/condaInheritEnvPrompt.ts b/src/client/interpreter/virtualEnvs/condaInheritEnvPrompt.ts index cf9175345cb0..6b5295724449 100644 --- a/src/client/interpreter/virtualEnvs/condaInheritEnvPrompt.ts +++ b/src/client/interpreter/virtualEnvs/condaInheritEnvPrompt.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { inject, injectable, optional } from 'inversify'; +import { inject, injectable } from 'inversify'; import { ConfigurationTarget, Uri } from 'vscode'; import { IExtensionActivationService } from '../../activation/types'; import { IApplicationEnvironment, IApplicationShell, IWorkspaceService } from '../../common/application/types'; @@ -26,7 +26,7 @@ export class CondaInheritEnvPrompt implements IExtensionActivationService { @inject(IPersistentStateFactory) private readonly persistentStateFactory: IPersistentStateFactory, @inject(IPlatformService) private readonly platformService: IPlatformService, @inject(IApplicationEnvironment) private readonly appEnvironment: IApplicationEnvironment, - @optional() public hasPromptBeenShownInCurrentSession: boolean = false, + public hasPromptBeenShownInCurrentSession: boolean = false, ) {} public async activate(resource: Uri): Promise {