From 98db327793749f11e18557b89b0ce35d60080fa0 Mon Sep 17 00:00:00 2001 From: Julian Gilbey Date: Thu, 5 Jan 2023 19:12:21 +0000 Subject: [PATCH 1/2] Fix or silence pylint warnings in lint_free test --- test/plugins/test_pylint_lint.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/plugins/test_pylint_lint.py b/test/plugins/test_pylint_lint.py index 3eae8914..01e85ef2 100644 --- a/test/plugins/test_pylint_lint.py +++ b/test/plugins/test_pylint_lint.py @@ -91,9 +91,10 @@ def test_lint_free_pylint(config, workspace): # Can't use temp_document because it might give us a file that doesn't # match pylint's naming requirements. We should be keeping this file clean # though, so it works for a test of an empty lint. - ws = Workspace(str(Path(__file__).absolute().parents[2]), workspace._endpoint) + # pylint: disable-next=protected-access + wksp = Workspace(str(Path(__file__).absolute().parents[2]), workspace._endpoint) assert not pylint_lint.pylsp_lint( - config, ws, Document(uris.from_fs_path(__file__), ws), True) + config, wksp, Document(uris.from_fs_path(__file__), wksp), True) def test_lint_caching(workspace): From 39e944f6c33f651f3d36c8b0b5b9c21ef1735185 Mon Sep 17 00:00:00 2001 From: Julian Gilbey Date: Sat, 7 Jan 2023 20:12:21 +0000 Subject: [PATCH 2/2] Show pylint output for debugging purposes --- pylsp/plugins/pylint_lint.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pylsp/plugins/pylint_lint.py b/pylsp/plugins/pylint_lint.py index 222cdb85..6fad73fc 100644 --- a/pylsp/plugins/pylint_lint.py +++ b/pylsp/plugins/pylint_lint.py @@ -132,6 +132,7 @@ def lint(cls, document, is_saved, flags=''): # * warning diagnostics = [] for diag in json.loads(json_out): + log.debug("Pylint raw output entry: %s", diag) # pylint lines index from 1, pylsp lines index from 0 line = diag['line'] - 1