Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove noop from external dependencies #10372

Merged
merged 2 commits into from
Jun 8, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -265,7 +265,7 @@ module.exports = {
],
'react/jsx-uses-vars': 'error',
'react/jsx-uses-react': 'error',
'no-restricted-imports': ['error', { paths: ['lodash', 'rxjs'] }],
'no-restricted-imports': ['error', { paths: ['lodash', 'rxjs', 'lodash/noop'] }],
'import/no-restricted-paths': [
'error',
{
2 changes: 1 addition & 1 deletion src/kernels/execution/notebookUpdater.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

import noop = require('lodash/noop');
import { isPromise } from 'rxjs/internal-compatibility';
import { NotebookDocument, NotebookEditor, workspace, WorkspaceEdit, window } from 'vscode';
import { createDeferred } from '../../platform/common/utils/async';
import { noop } from '../../platform/common/utils/misc';

/**
* Use this class to perform updates on all cells.
2 changes: 1 addition & 1 deletion src/notebooks/controllers/remoteSwitcher.ts
Original file line number Diff line number Diff line change
@@ -2,7 +2,6 @@
// Licensed under the MIT License.

import { inject, injectable } from 'inversify';
import noop = require('lodash/noop');
import { StatusBarAlignment, StatusBarItem } from 'vscode';
import { IExtensionSingleActivationService } from '../../platform/activation/types';
import {
@@ -19,6 +18,7 @@ import { INotebookControllerManager } from '../types';
import { IJupyterServerUriStorage } from '../../kernels/jupyter/types';
import { Settings } from '../../platform/common/constants';
import { isJupyterNotebook } from '../../platform/common/utils';
import { noop } from '../../platform/common/utils/misc';

@injectable()
export class RemoteSwitcher implements IExtensionSingleActivationService {
2 changes: 1 addition & 1 deletion src/platform/api/pythonApi.ts
Original file line number Diff line number Diff line change
@@ -18,7 +18,6 @@ import {
} from './types';
import * as localize from '../common/utils/localize';
import { injectable, inject } from 'inversify';
import { noop } from 'rxjs/util/noop';
import { captureTelemetry, sendTelemetryEvent } from '../../telemetry';
import { IWorkspaceService, IApplicationShell, ICommandManager } from '../common/application/types';
import { isCI, PythonExtension, Telemetry } from '../common/constants';
@@ -30,6 +29,7 @@ import { IInterpreterSelector, IInterpreterQuickPickItem } from '../interpreter/
import { IInterpreterService } from '../interpreter/contracts';
import { areInterpreterPathsSame } from '../pythonEnvironments/info/interpreter';
import { TraceOptions } from '../logging/types';
import { noop } from '../common/utils/misc';

export function deserializePythonEnvironment(
pythonVersion: Partial<PythonEnvironment_PythonApi> | undefined
3 changes: 1 addition & 2 deletions src/test/datascience/helpers.ts
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@ import { assert } from 'chai';
import * as vscode from 'vscode';
import { getFilePath } from '../../platform/common/platform/fs-paths';
import { traceInfo } from '../../platform/logging';
import noop = require('lodash/noop');
import { IPythonApiProvider } from '../../platform/api/types';
import { IJupyterSettings, Resource } from '../../platform/common/types';
import { InteractiveWindow } from '../../interactive-window/interactiveWindow';
@@ -20,7 +19,7 @@ import {
import { IDataScienceCodeLensProvider } from '../../interactive-window/editor-integration/types';
import { IInteractiveWindowProvider, IInteractiveWindow } from '../../interactive-window/types';
import { Commands } from '../../platform/common/constants';
import { sleep } from '../core';
import { noop, sleep } from '../core';
import { arePathsSame } from '../../platform/common/platform/fileUtils';
import { IS_REMOTE_NATIVE_TEST } from '../constants';
import { isWeb } from '../../platform/common/utils/misc';
2 changes: 1 addition & 1 deletion src/test/datascience/mockCommandManager.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
'use strict';
import noop = require('lodash/noop');
import { Disposable, TextEditor, TextEditorEdit } from 'vscode';

import { ICommandNameArgumentTypeMapping } from '../../platform/common/application/commands';
import { ICommandManager } from '../../platform/common/application/types';
import { noop } from '../core';

/* eslint-disable @typescript-eslint/no-explicit-any, , no-multi-str, */
export class MockCommandManager implements ICommandManager {
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@ suite('Dummy13', () => {
});
});
// import { assert } from 'chai';
// import { noop } from 'jquery';
// import * as portfinder from 'portfinder';
// import * as uuid from 'uuid/v4';
// import { IPythonExtensionChecker } from '../../../platform/api/types';