Skip to content

Commit

Permalink
Remove double event listening
Browse files Browse the repository at this point in the history
  • Loading branch information
MikhailArkhipov committed Mar 7, 2018
1 parent bd2e936 commit af573be
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/client/providers/linterProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ import { ConfigSettingMonitor } from '../common/configSettingMonitor';
import { isTestExecution } from '../common/constants';
import { IFileSystem } from '../common/platform/types';
import { IConfigurationService } from '../common/types';
import { IInterpreterService } from '../interpreter/contracts';
import { IServiceContainer } from '../ioc/types';
import { ILinterManager, ILintingEngine } from '../linters/types';

export class LinterProvider implements vscode.Disposable {
private context: vscode.ExtensionContext;
private disposables: vscode.Disposable[];
private configMonitor: ConfigSettingMonitor;
private interpreterService: IInterpreterService;
private documents: IDocumentManager;
private configuration: IConfigurationService;
private linterManager: ILinterManager;
Expand All @@ -31,12 +29,9 @@ export class LinterProvider implements vscode.Disposable {
this.fs = serviceContainer.get<IFileSystem>(IFileSystem);
this.engine = serviceContainer.get<ILintingEngine>(ILintingEngine);
this.linterManager = serviceContainer.get<ILinterManager>(ILinterManager);
this.interpreterService = serviceContainer.get<IInterpreterService>(IInterpreterService);
this.documents = serviceContainer.get<IDocumentManager>(IDocumentManager);
this.configuration = serviceContainer.get<IConfigurationService>(IConfigurationService);

this.disposables.push(this.interpreterService.onDidChangeInterpreter(() => this.engine.lintOpenPythonFiles()));

this.documents.onDidOpenTextDocument(e => this.onDocumentOpened(e), this.context.subscriptions);
this.documents.onDidCloseTextDocument(e => this.onDocumentClosed(e), this.context.subscriptions);
this.documents.onDidSaveTextDocument((e) => this.onDocumentSaved(e), this.context.subscriptions);
Expand Down

0 comments on commit af573be

Please sign in to comment.