@@ -442,14 +442,13 @@ def lint(self, doc_uri, is_saved):
442
442
workspace = self ._match_uri_to_workspace (doc_uri )
443
443
document_object = workspace .documents .get (doc_uri , None )
444
444
if isinstance (document_object , Document ):
445
- self ._lint_text_document (doc_uri , workspace , is_saved = is_saved )
445
+ self ._lint_text_document (doc_uri , workspace , is_saved , doc_version )
446
446
elif isinstance (document_object , Notebook ):
447
447
self ._lint_notebook_document (document_object , workspace )
448
448
449
- def _lint_text_document (self , doc_uri , workspace , is_saved ):
450
- document_object = workspace .documents .get (doc_uri , None )
449
+ def _lint_text_document (self , doc_uri , workspace , is_saved , doc_version = None ):
451
450
workspace .publish_diagnostics (
452
- doc_uri , flatten (self ._hook ("pylsp_lint" , doc_uri , is_saved = is_saved )), document_object . version ,
451
+ doc_uri , flatten (self ._hook ("pylsp_lint" , doc_uri , is_saved = is_saved )), doc_version ,
453
452
)
454
453
455
454
def _lint_notebook_document (self , notebook_document , workspace ):
0 commit comments