Skip to content

Commit 8c81ffb

Browse files
committed
Also strip message field
1 parent 62ebafa commit 8c81ffb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pyls_mypy/plugin.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def pyls_lint(document):
3131
# There may be a better solution, but mypy does not provide end
3232
'end': {'line': lineno - 1, 'character': offset + 1}
3333
},
34-
'message': msg,
34+
'message': msg.strip(),
3535
'severity': errno
3636
})
3737

test/test_plugin.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ def test_plugin():
1111

1212
assert len(diags) == 1
1313
diag = diags[0]
14-
assert diag['message'] == ' Dict[<nothing>, <nothing>] has no attribute "append"'
14+
assert diag['message'] == 'Dict[<nothing>, <nothing>] has no attribute "append"'
1515
assert diag['range']['start'] == {'line': 0, 'character': 0}
1616
assert diag['range']['end'] == {'line': 0, 'character': 1}

0 commit comments

Comments
 (0)