diff --git a/bundled/tool/lsp_server.py b/bundled/tool/lsp_server.py index 5dfd3fe..74bc9fb 100644 --- a/bundled/tool/lsp_server.py +++ b/bundled/tool/lsp_server.py @@ -650,9 +650,12 @@ def _run_tool_on_document( cwd=cwd, source=source, ) + except isort.exceptions.FileSkipComment: + log_warning(f"Skipping file with 'skip_file' comment: {document.path}") + return None except isort.exceptions.FileSkipped: log_warning(traceback.format_exc(chain=True)) - # Ignore file skipped. + return None except Exception: log_error(traceback.format_exc(chain=True)) raise