mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-13 12:15:10 +00:00
Refactoring: Rename Language to LanguageServerId
This resolves a long-standing naming issue in Serena & SolidLSP.
This commit is contained in:
1 parent
ef0e218fb1
commit
d2cf18ddcb
180 files changed
+1806
-1767
No files matched your search
@@ -2,7 +2,7 @@
|
||||
This module contains the exceptions raised by the framework.
|
||||
"""
|
||||
|
||||
from solidlsp.ls_config import Language
|
||||
from solidlsp.ls_config import LanguageServerId
|
||||
|
||||
|
||||
class SolidLSPException(Exception):
|
||||
@@ -28,14 +28,14 @@ class SolidLSPException(Exception):
|
||||
|
||||
return isinstance(self.cause, LanguageServerTerminatedException)
|
||||
|
||||
def get_affected_language(self) -> Language | None:
|
||||
def get_affected_language(self) -> LanguageServerId | None:
|
||||
"""
|
||||
:return: the affected language for the case where the exception is caused by the language server having terminated
|
||||
"""
|
||||
from .ls_process import LanguageServerTerminatedException
|
||||
|
||||
if isinstance(self.cause, LanguageServerTerminatedException):
|
||||
return self.cause.language
|
||||
return self.cause.ls_id
|
||||
return None
|
||||
|
||||
def __str__(self) -> str:
|
||||
|
||||
Reference in new issue
Block a user