@@ -8,12 +8,11 @@ import { Minimatch } from 'minimatch';
88import  *  as  path  from  'path' ; 
99import  *  as  vscode  from  'vscode' ; 
1010import  {  IDocumentManager ,  IWorkspaceService  }  from  '../common/application/types' ; 
11- import  {  LinterErrors ,   STANDARD_OUTPUT_CHANNEL  }  from  '../common/constants' ; 
11+ import  {  STANDARD_OUTPUT_CHANNEL  }  from  '../common/constants' ; 
1212import  {  IFileSystem  }  from  '../common/platform/types' ; 
1313import  {  IConfigurationService ,  IOutputChannel  }  from  '../common/types' ; 
1414import  {  StopWatch  }  from  '../common/utils/stopWatch' ; 
1515import  {  IServiceContainer  }  from  '../ioc/types' ; 
16- import  {  JupyterProvider  }  from  '../jupyter/provider' ; 
1716import  {  sendTelemetryWhenDone  }  from  '../telemetry' ; 
1817import  {  EventName  }  from  '../telemetry/constants' ; 
1918import  {  LinterTrigger ,  LintingTelemetry  }  from  '../telemetry/types' ; 
@@ -27,15 +26,8 @@ lintSeverityToVSSeverity.set(LintMessageSeverity.Hint, vscode.DiagnosticSeverity
2726lintSeverityToVSSeverity . set ( LintMessageSeverity . Information ,  vscode . DiagnosticSeverity . Information ) ; 
2827lintSeverityToVSSeverity . set ( LintMessageSeverity . Warning ,  vscode . DiagnosticSeverity . Warning ) ; 
2928
30- // tslint:disable-next-line:interface-name 
31- interface  DocumentHasJupyterCodeCells  { 
32-  // tslint:disable-next-line:callable-types 
33-  ( doc : vscode . TextDocument ,  token : vscode . CancellationToken ) : Promise < Boolean > ; 
34- } 
35- 
3629@injectable ( ) 
3730export  class  LintingEngine  implements  ILintingEngine  { 
38-  private  documentHasJupyterCodeCells : DocumentHasJupyterCodeCells ; 
3931 private  workspace : IWorkspaceService ; 
4032 private  documents : IDocumentManager ; 
4133 private  configurationService : IConfigurationService ; 
@@ -46,7 +38,6 @@ export class LintingEngine implements ILintingEngine {
4638 private  fileSystem : IFileSystem ; 
4739
4840 constructor ( @inject ( IServiceContainer )  private  serviceContainer : IServiceContainer )  { 
49-  this . documentHasJupyterCodeCells  =  ( _a ,  _b )  =>  Promise . resolve ( false ) ; 
5041 this . documents  =  serviceContainer . get < IDocumentManager > ( IDocumentManager ) ; 
5142 this . workspace  =  serviceContainer . get < IWorkspaceService > ( IWorkspaceService ) ; 
5243 this . configurationService  =  serviceContainer . get < IConfigurationService > ( IConfigurationService ) ; 
@@ -110,7 +101,6 @@ export class LintingEngine implements ILintingEngine {
110101 return  promise ; 
111102 } ) ; 
112103
113-  const  hasJupyterCodeCells  =  await  this . documentHasJupyterCodeCells ( document ,  cancelToken . token ) ; 
114104 // linters will resolve asynchronously - keep a track of all 
115105 // diagnostics reported as them come in. 
116106 let  diagnostics : vscode . Diagnostic [ ]  =  [ ] ; 
@@ -125,13 +115,6 @@ export class LintingEngine implements ILintingEngine {
125115 if  ( this . isDocumentOpen ( document . uri ) )  { 
126116 // Build the message and suffix the message with the name of the linter used. 
127117 for  ( const  m  of  msgs )  { 
128-  // Ignore magic commands from jupyter. 
129-  if  ( hasJupyterCodeCells  &&  document . lineAt ( m . line  -  1 ) . text . trim ( ) . startsWith ( '%' )  && 
130-  ( m . code  ===  LinterErrors . pylint . InvalidSyntax  || 
131-  m . code  ===  LinterErrors . prospector . InvalidSyntax  || 
132-  m . code  ===  LinterErrors . flake8 . InvalidSyntax ) )  { 
133-  continue ; 
134-  } 
135118 diagnostics . push ( this . createDiagnostics ( m ,  document ) ) ; 
136119 } 
137120 // Limit the number of messages to the max value. 
@@ -142,20 +125,6 @@ export class LintingEngine implements ILintingEngine {
142125 this . diagnosticCollection . set ( document . uri ,  diagnostics ) ; 
143126 } 
144127
145-  // tslint:disable-next-line:no-any 
146-  public  async  linkJupyterExtension ( jupyter : vscode . Extension < any >  |  undefined ) : Promise < void >  { 
147-  if  ( ! jupyter )  { 
148-  return ; 
149-  } 
150-  if  ( ! jupyter . isActive )  { 
151-  await  jupyter . activate ( ) ; 
152-  } 
153-  // tslint:disable-next-line:no-unsafe-any 
154-  jupyter . exports . registerLanguageProvider ( PYTHON . language ,  new  JupyterProvider ( ) ) ; 
155-  // tslint:disable-next-line:no-unsafe-any 
156-  this . documentHasJupyterCodeCells  =  jupyter . exports . hasCodeCells ; 
157-  } 
158- 
159128 private  sendLinterRunTelemetry ( info : ILinterInfo ,  resource : vscode . Uri ,  promise : Promise < ILintMessage [ ] > ,  stopWatch : StopWatch ,  trigger : LinterTrigger ) : void   { 
160129 const  linterExecutablePathName  =  info . pathName ( resource ) ; 
161130 const  properties : LintingTelemetry  =  { 
0 commit comments