@@ -6,7 +6,6 @@ import * as fs from 'fs';
66import {
77 ConfigurationChangeEvent ,
88 ConfigurationTarget ,
9- DiagnosticSeverity ,
109 Disposable ,
1110 Event ,
1211 EventEmitter ,
@@ -29,7 +28,6 @@ import {
2928 IExperiments ,
3029 IInterpreterPathService ,
3130 IInterpreterSettings ,
32- ILintingSettings ,
3331 IPythonSettings ,
3432 ITensorBoardSettings ,
3533 ITerminalSettings ,
@@ -106,8 +104,6 @@ export class PythonSettings implements IPythonSettings {
106104
107105 public devOptions : string [ ] = [ ] ;
108106
109- public linting ! : ILintingSettings ;
110-
111107 public autoComplete ! : IAutoCompleteSettings ;
112108
113109 public tensorBoard : ITensorBoardSettings | undefined ;
@@ -304,94 +300,8 @@ export class PythonSettings implements IPythonSettings {
304300 this . devOptions = systemVariables . resolveAny ( pythonSettings . get < any [ ] > ( 'devOptions' ) ) ! ;
305301 this . devOptions = Array . isArray ( this . devOptions ) ? this . devOptions : [ ] ;
306302
307- const lintingSettings = systemVariables . resolveAny ( pythonSettings . get < ILintingSettings > ( 'linting' ) ) ! ;
308- if ( this . linting ) {
309- Object . assign < ILintingSettings , ILintingSettings > ( this . linting , lintingSettings ) ;
310- } else {
311- this . linting = lintingSettings ;
312- }
313-
314303 this . globalModuleInstallation = pythonSettings . get < boolean > ( 'globalModuleInstallation' ) === true ;
315304
316- // Support for travis.
317- this . linting = this . linting
318- ? this . linting
319- : {
320- enabled : false ,
321- cwd : undefined ,
322- ignorePatterns : [ ] ,
323- flake8Args : [ ] ,
324- flake8Enabled : false ,
325- flake8Path : 'flake8' ,
326- lintOnSave : false ,
327- maxNumberOfProblems : 100 ,
328- mypyArgs : [ ] ,
329- mypyEnabled : false ,
330- mypyPath : 'mypy' ,
331- banditArgs : [ ] ,
332- banditEnabled : false ,
333- banditPath : 'bandit' ,
334- pycodestyleArgs : [ ] ,
335- pycodestyleEnabled : false ,
336- pycodestylePath : 'pycodestyle' ,
337- pylamaArgs : [ ] ,
338- pylamaEnabled : false ,
339- pylamaPath : 'pylama' ,
340- prospectorArgs : [ ] ,
341- prospectorEnabled : false ,
342- prospectorPath : 'prospector' ,
343- pydocstyleArgs : [ ] ,
344- pydocstyleEnabled : false ,
345- pydocstylePath : 'pydocstyle' ,
346- pylintArgs : [ ] ,
347- pylintEnabled : false ,
348- pylintPath : 'pylint' ,
349- pylintCategorySeverity : {
350- convention : DiagnosticSeverity . Hint ,
351- error : DiagnosticSeverity . Error ,
352- fatal : DiagnosticSeverity . Error ,
353- refactor : DiagnosticSeverity . Hint ,
354- warning : DiagnosticSeverity . Warning ,
355- } ,
356- pycodestyleCategorySeverity : {
357- E : DiagnosticSeverity . Error ,
358- W : DiagnosticSeverity . Warning ,
359- } ,
360- flake8CategorySeverity : {
361- E : DiagnosticSeverity . Error ,
362- W : DiagnosticSeverity . Warning ,
363- // Per http://flake8.pycqa.org/en/latest/glossary.html#term-error-code
364- // 'F' does not mean 'fatal as in PyLint but rather 'pyflakes' such as
365- // unused imports, variables, etc.
366- F : DiagnosticSeverity . Warning ,
367- } ,
368- mypyCategorySeverity : {
369- error : DiagnosticSeverity . Error ,
370- note : DiagnosticSeverity . Hint ,
371- } ,
372- } ;
373- this . linting . pylintPath = getAbsolutePath ( systemVariables . resolveAny ( this . linting . pylintPath ) , workspaceRoot ) ;
374- this . linting . flake8Path = getAbsolutePath ( systemVariables . resolveAny ( this . linting . flake8Path ) , workspaceRoot ) ;
375- this . linting . pycodestylePath = getAbsolutePath (
376- systemVariables . resolveAny ( this . linting . pycodestylePath ) ,
377- workspaceRoot ,
378- ) ;
379- this . linting . pylamaPath = getAbsolutePath ( systemVariables . resolveAny ( this . linting . pylamaPath ) , workspaceRoot ) ;
380- this . linting . prospectorPath = getAbsolutePath (
381- systemVariables . resolveAny ( this . linting . prospectorPath ) ,
382- workspaceRoot ,
383- ) ;
384- this . linting . pydocstylePath = getAbsolutePath (
385- systemVariables . resolveAny ( this . linting . pydocstylePath ) ,
386- workspaceRoot ,
387- ) ;
388- this . linting . mypyPath = getAbsolutePath ( systemVariables . resolveAny ( this . linting . mypyPath ) , workspaceRoot ) ;
389- this . linting . banditPath = getAbsolutePath ( systemVariables . resolveAny ( this . linting . banditPath ) , workspaceRoot ) ;
390-
391- if ( this . linting . cwd ) {
392- this . linting . cwd = getAbsolutePath ( systemVariables . resolveAny ( this . linting . cwd ) , workspaceRoot ) ;
393- }
394-
395305 const testSettings = systemVariables . resolveAny ( pythonSettings . get < ITestingSettings > ( 'testing' ) ) ! ;
396306 if ( this . testing ) {
397307 Object . assign < ITestingSettings , ITestingSettings > ( this . testing , testSettings ) ;
0 commit comments