We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 590cecc commit 2867a45Copy full SHA for 2867a45
pylsp_isort/plugin.py
@@ -7,7 +7,7 @@
7
from isort.settings import KNOWN_PREFIX
8
from pylsp import hookimpl
9
from pylsp.config.config import Config
10
-from pylsp.workspace import Document
+from pylsp.workspace import Document, Workspace
11
12
logger = logging.getLogger(__name__)
13
@@ -34,8 +34,12 @@ def pylsp_settings() -> Dict[str, Any]:
34
35
36
@hookimpl(hookwrapper=True)
37
-def pylsp_format_document(config: Config, document: Document) -> Generator:
+def pylsp_format_document(
38
+ config: Config, workspace: Workspace, document: Document
39
+) -> Generator:
40
outcome = yield
41
+ with workspace.report_progress("format: isort"):
42
+ _format(outcome, config, document)
43
_format(outcome, config, document)
44
45
0 commit comments