Skip to content

Commit

Permalink
Remove unnecessary @optional decorators
Browse files Browse the repository at this point in the history
  • Loading branch information
rchiodo committed Aug 22, 2024
1 parent 7e152db commit cb6b40f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/client/activation/extensionSurvey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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<void> {
Expand Down
4 changes: 2 additions & 2 deletions src/client/common/variables/environmentVariablesProvider.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions src/client/interpreter/virtualEnvs/activatedEnvLaunch.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/client/interpreter/virtualEnvs/condaInheritEnvPrompt.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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<void> {
Expand Down

0 comments on commit cb6b40f

Please sign in to comment.