Skip to content

Commit 4b7c82b

Browse files
committed
fixed linting of pylint
1 parent a42e1e0 commit 4b7c82b

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ Works on both Windows and Mac.
7878

7979
## Change Log
8080

81+
### Version 0.1.2
82+
* Fixed autoformatting of code (falling over when using yapf8)
83+
8184
### Version 0.1.1
8285
* Added support for linting using flake8
8386
* Added support for unit testing using unittest and nosetest

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "python",
33
"displayName": "Python",
44
"description": "Linting, Debugging, Intellisense, auto-completion, code formatting, snippets, and more.",
5-
"version": "0.1.1",
5+
"version": "0.1.2",
66
"publisher": "donjayamanne",
77
"license": "SEE LICENSE IN LICENSE or README.MD",
88
"homepage": "https://github.com/DonJayamanne/pythonVSCode/blob/master/README.md",
@@ -222,9 +222,9 @@
222222
},
223223
"python.formatting.yapfPath": {
224224
"type": "string",
225-
"default": "",
225+
"default": "yapf",
226226
"description": "Path to yapf, you can use a custom version of yapf by modifying this setting to include the full path."
227-
},
227+
},
228228
"python.autoComplete.extraPaths": {
229229
"type": "array",
230230
"default": [],

src/client/common/configSettings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export class PythonSettings implements IPythonSettings {
6363
this.linting = lintingSettings;
6464
}
6565

66-
var formattingSettings = pythonSettings.get<IFormattingSettings>("linting");
66+
var formattingSettings = pythonSettings.get<IFormattingSettings>("formatting");
6767
if (this.formatting) {
6868
Object.assign<IFormattingSettings, IFormattingSettings>(this.formatting, formattingSettings);
6969
}

src/client/linters/baseLinter.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ export abstract class BaseLinter {
6868

6969
return new Promise<ILintMessage[]>((resolve, reject) => {
7070
var fileDir = path.dirname(filePath);
71-
sendCommand(commandLine, fileDir).then(data => {
71+
sendCommand(commandLine, fileDir, true).then(data => {
72+
outputChannel.clear();
73+
outputChannel.append(data);
7274
var outputLines = data.split(/\r?\n/g);
7375
var diagnostics: ILintMessage[] = [];
7476
outputLines.filter((value, index) => index <= this.pythonSettings.linting.maxNumberOfProblems).forEach(line=> {

0 commit comments

Comments
 (0)