From a52756be465ffffcad36748d565f3c6b9af38fab Mon Sep 17 00:00:00 2001 From: Dominik Jain Date: Wed, 19 Nov 2025 23:05:55 +0100 Subject: [PATCH] Remove duplicate type RenameParams --- src/solidlsp/ls.py | 5 +++-- src/solidlsp/ls_types.py | 11 ----------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/solidlsp/ls.py b/src/solidlsp/ls.py index 50640621..9420dec8 100644 --- a/src/solidlsp/ls.py +++ b/src/solidlsp/ls.py @@ -31,7 +31,8 @@ from solidlsp.ls_utils import FileUtils, PathUtils, TextUtils from solidlsp.lsp_protocol_handler import lsp_types from solidlsp.lsp_protocol_handler import lsp_types as LSPTypes from solidlsp.lsp_protocol_handler.lsp_constants import LSPConstants -from solidlsp.lsp_protocol_handler.lsp_types import Definition, DefinitionParams, DocumentSymbol, LocationLink, SymbolInformation +from solidlsp.lsp_protocol_handler.lsp_types import Definition, DefinitionParams, DocumentSymbol, LocationLink, SymbolInformation, \ + RenameParams from solidlsp.lsp_protocol_handler.server import ( LSPError, ProcessLaunchInfo, @@ -1860,7 +1861,7 @@ class SolidLanguageServer(ABC): :param new_name: The new name for the symbol :return: A WorkspaceEdit containing the changes needed to rename the symbol, or None if rename is not supported """ - params = ls_types.RenameParams( + params = RenameParams( textDocument=ls_types.TextDocumentIdentifier( uri=pathlib.Path(os.path.join(self.repository_root_path, relative_file_path)).as_uri() ), diff --git a/src/solidlsp/ls_types.py b/src/solidlsp/ls_types.py index 67000974..3b999419 100644 --- a/src/solidlsp/ls_types.py +++ b/src/solidlsp/ls_types.py @@ -354,17 +354,6 @@ class WorkspaceEdit(TypedDict): """ Document changes array for versioned edits. """ -class RenameParams(TypedDict): - """The parameters of a RenameRequest.""" - - textDocument: TextDocumentIdentifier - """ The document to rename. """ - position: Position - """ The position at which this request was sent. """ - newName: str - """ The new name of the symbol. """ - - class Diagnostic(TypedDict): """Diagnostic information for a text document."""