Skip to content

Commit

Permalink
remove CompletionEditRange because it is no longer necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
predragnikolic committed Jun 27, 2024
1 parent 996acb8 commit 28989a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions plugin/completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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


Expand Down
2 changes: 0 additions & 2 deletions plugin/core/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -6281,7 +6281,5 @@ def to_lsp(self) -> Position:
'session_name': str
})

CompletionEditRange = EditRangeWithInsertReplace

# Temporary for backward compatibility with LSP packages.
RangeLsp = Range

0 comments on commit 28989a7

Please sign in to comment.