From 28989a7e04711828d87a2e8e29e2dcb95adef330 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D1=80=D0=B5=D0=B4=D1=80=D0=B0=D0=B3=20=D0=9D=D0=B8?= =?UTF-8?q?=D0=BA=D0=BE=D0=BB=D0=B8=D1=9B?= Date: Thu, 27 Jun 2024 22:41:44 +0200 Subject: [PATCH] remove CompletionEditRange because it is no longer necessary --- plugin/completion.py | 4 ++-- plugin/core/protocol.py | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/plugin/completion.py b/plugin/completion.py index 5b1ad1c1f..21c13f9de 100644 --- a/plugin/completion.py +++ b/plugin/completion.py @@ -3,7 +3,7 @@ from .core.edit import apply_text_edits from .core.logging import debug from .core.promise import Promise -from .core.protocol import CompletionEditRange +from .core.protocol import EditRangeWithInsertReplace from .core.protocol import CompletionItem from .core.protocol import CompletionItemDefaults from .core.protocol import CompletionItemKind @@ -127,7 +127,7 @@ def is_range(val: Any) -> TypeGuard[Range]: return isinstance(val, dict) and 'start' in val and 'end' in val -def is_edit_range(val: Any) -> TypeGuard[CompletionEditRange]: +def is_edit_range(val: Any) -> TypeGuard[EditRangeWithInsertReplace]: return isinstance(val, dict) and 'insert' in val and 'replace' in val diff --git a/plugin/core/protocol.py b/plugin/core/protocol.py index 888c1e630..de3eb4089 100644 --- a/plugin/core/protocol.py +++ b/plugin/core/protocol.py @@ -6281,7 +6281,5 @@ def to_lsp(self) -> Position: 'session_name': str }) -CompletionEditRange = EditRangeWithInsertReplace - # Temporary for backward compatibility with LSP packages. RangeLsp = Range