mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-13 20:15:20 +00:00
Make _create_base_initialize_params fully abstract, forcing subclasses to implement it
This commit is contained in:
1 parent
cb7ba3f905
commit
6d39822363
2 files changed
+4
-1
No files matched your search
+1
-1
@@ -3321,6 +3321,7 @@ class SolidLanguageServer(ABC):
|
||||
def _create_initialize_params_builder(self) -> InitializeParamsBuilder:
|
||||
return DefaultInitializeParamsBuilder(self)
|
||||
|
||||
@abstractmethod
|
||||
def _create_base_initialize_params(self) -> dict | InitializeParams:
|
||||
"""
|
||||
Subclasses should override this method to provide server-specific InitializeParams settings,
|
||||
@@ -3340,7 +3341,6 @@ class SolidLanguageServer(ABC):
|
||||
|
||||
:return: the base InitializeParams settings
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
def _create_initialize_params(self) -> InitializeParams:
|
||||
"""
|
||||
|
||||
@@ -7,6 +7,9 @@ class DummyLanguageServer(SolidLanguageServer):
|
||||
def _start_server(self) -> None:
|
||||
raise AssertionError("Not used in this test")
|
||||
|
||||
def _create_base_initialize_params(self) -> dict:
|
||||
return {}
|
||||
|
||||
|
||||
def test_request_rename_symbol_edit_opens_file_before_rename(tmp_path) -> None:
|
||||
(tmp_path / "index.ts").write_text("export const x = 1;\n", encoding="utf-8")
|
||||
|
||||
Reference in new issue
Block a user