From 4ba32503ae2698006fbb465e17e8e73f0e3a80fe Mon Sep 17 00:00:00 2001 From: Carlos Cordoba Date: Wed, 24 Jul 2024 11:46:18 -0500 Subject: [PATCH] Linting fixes --- pylsp/python_lsp.py | 8 ++++++-- pylsp/workspace.py | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pylsp/python_lsp.py b/pylsp/python_lsp.py index 8606aba1..d50d5242 100644 --- a/pylsp/python_lsp.py +++ b/pylsp/python_lsp.py @@ -442,13 +442,17 @@ def lint(self, doc_uri, is_saved): workspace = self._match_uri_to_workspace(doc_uri) document_object = workspace.documents.get(doc_uri, None) if isinstance(document_object, Document): - self._lint_text_document(doc_uri, workspace, is_saved, document_object.version) + self._lint_text_document( + doc_uri, workspace, is_saved, document_object.version + ) elif isinstance(document_object, Notebook): self._lint_notebook_document(document_object, workspace) def _lint_text_document(self, doc_uri, workspace, is_saved, doc_version=None): workspace.publish_diagnostics( - doc_uri, flatten(self._hook("pylsp_lint", doc_uri, is_saved=is_saved)), doc_version, + doc_uri, + flatten(self._hook("pylsp_lint", doc_uri, is_saved=is_saved)), + doc_version, ) def _lint_notebook_document(self, notebook_document, workspace): diff --git a/pylsp/workspace.py b/pylsp/workspace.py index 59d73aef..c9b63a99 100644 --- a/pylsp/workspace.py +++ b/pylsp/workspace.py @@ -324,7 +324,7 @@ def _progress_end(self, token: str, message: Optional[str] = None) -> None: "value": value, }, ) - + def log_message(self, message, msg_type=lsp.MessageType.Info): self._endpoint.notify( self.M_LOG_MESSAGE, params={"type": msg_type, "message": message}