@@ -7,7 +7,7 @@ import * as path from 'path';
77
88export interface IPythonSettings {
99 pythonPath : string ;
10- devOptions : any [ ] ;
10+ devOptions : string [ ] ;
1111 linting : ILintingSettings ;
1212 formatting : IFormattingSettings ;
1313 unitTest : IUnitTestSettings ;
@@ -116,6 +116,24 @@ export class PythonSettings extends EventEmitter implements IPythonSettings {
116116 this . linting = { } as ILintingSettings ;
117117 }
118118 }
119+ // Support for travis
120+ this . linting = this . linting ? this . linting : {
121+ enabled : false ,
122+ flake8Args : [ ] , flake8Enabled : false , flake8Path : 'flake' ,
123+ lintOnSave : false , lintOnTextChange : false , maxNumberOfProblems : 100 ,
124+ mypyArgs : [ ] , mypyEnabled : false , mypyPath : 'mypy' ,
125+ outputWindow : 'python' , pep8Args : [ ] , pep8Enabled : false , pep8Path : 'pep8' ,
126+ prospectorArgs : [ ] , prospectorEnabled : false , prospectorPath : 'prospector' ,
127+ pydocstleArgs : [ ] , pydocstyleEnabled : false , pydocStylePath : 'pydocstyle' ,
128+ pylintArgs : [ ] , pylintEnabled : false , pylintPath : 'pylint' ,
129+ pylintCategorySeverity : {
130+ convention : vscode . DiagnosticSeverity . Hint ,
131+ error : vscode . DiagnosticSeverity . Error ,
132+ fatal : vscode . DiagnosticSeverity . Error ,
133+ refactor : vscode . DiagnosticSeverity . Hint ,
134+ warning : vscode . DiagnosticSeverity . Warning
135+ }
136+ } ;
119137 this . linting . pylintPath = getAbsolutePath ( this . linting . pylintPath , workspaceRoot ) ;
120138 this . linting . flake8Path = getAbsolutePath ( this . linting . flake8Path , workspaceRoot ) ;
121139 this . linting . pep8Path = getAbsolutePath ( this . linting . pep8Path , workspaceRoot ) ;
@@ -129,6 +147,13 @@ export class PythonSettings extends EventEmitter implements IPythonSettings {
129147 else {
130148 this . formatting = formattingSettings ;
131149 }
150+ // Support for travis
151+ this . formatting = this . formatting ? this . formatting : {
152+ autopep8Args : [ ] , autopep8Path : 'autopep8' ,
153+ formatOnSave : false , outputWindow : 'python' ,
154+ provider : 'autopep8' ,
155+ yapfArgs : [ ] , yapfPath : 'yapf'
156+ } ;
132157 this . formatting . autopep8Path = getAbsolutePath ( this . formatting . autopep8Path , workspaceRoot ) ;
133158 this . formatting . yapfPath = getAbsolutePath ( this . formatting . yapfPath , workspaceRoot ) ;
134159
@@ -139,6 +164,10 @@ export class PythonSettings extends EventEmitter implements IPythonSettings {
139164 else {
140165 this . autoComplete = autoCompleteSettings ;
141166 }
167+ // Support for travis
168+ this . autoComplete = this . autoComplete ? this . autoComplete : {
169+ extraPaths : [ ]
170+ } ;
142171
143172 let unitTestSettings = systemVariables . resolveAny ( pythonSettings . get < IUnitTestSettings > ( 'unitTest' ) ) ;
144173 if ( this . unitTest ) {
@@ -151,6 +180,13 @@ export class PythonSettings extends EventEmitter implements IPythonSettings {
151180 }
152181 }
153182 this . emit ( 'change' ) ;
183+ // Support for travis
184+ this . unitTest = this . unitTest ? this . unitTest : {
185+ nosetestArgs : [ ] , nosetestPath : 'nosetest' , nosetestsEnabled : false ,
186+ outputWindow : 'python' ,
187+ pyTestArgs : [ ] , pyTestEnabled : false , pyTestPath : 'pytest' ,
188+ unittestArgs : [ ] , unittestEnabled : false
189+ } ;
154190 this . unitTest . pyTestPath = getAbsolutePath ( this . unitTest . pyTestPath , workspaceRoot ) ;
155191 this . unitTest . nosetestPath = getAbsolutePath ( this . unitTest . nosetestPath , workspaceRoot ) ;
156192
@@ -169,7 +205,17 @@ export class PythonSettings extends EventEmitter implements IPythonSettings {
169205 this . terminal = { } as ITerminalSettings ;
170206 }
171207 }
208+ // Support for travis
209+ this . terminal = this . terminal ? this . terminal : {
210+ executeInFileDir : true ,
211+ launchArgs : [ ]
212+ } ;
213+
172214 this . jupyter = pythonSettings . get < JupyterSettings > ( 'jupyter' ) ;
215+ // Support for travis
216+ this . jupyter = this . jupyter ? this . jupyter : {
217+ appendResults : true , defaultKernel : '' , startupCode : [ ]
218+ } ;
173219 }
174220
175221 public pythonPath : string ;
0 commit comments