feat: removing "install_signal_handlers" method from protocol (would have been overwritten anyway)

This commit is contained in:
Mose Müller 2023-10-03 16:14:58 +02:00
parent 78b94d4fc8
commit bdbb79e131

View File

@ -28,9 +28,8 @@ class AdditionalServerProtocol(Protocol):
This protocol sets the standard for how additional servers should be implemented
to ensure compatibility with the main Server class. The protocol requires that
any server implementing it should have an __init__ method for initialization, a
serve method for starting the server, and an install_signal_handlers method for
setting up signal handlers.
any server implementing it should have an __init__ method for initialization and a
serve method for starting the server.
Parameters:
-----------
@ -62,12 +61,6 @@ class AdditionalServerProtocol(Protocol):
"""
...
def install_signal_handlers(self) -> None:
"""Sets up signal handlers for the server. This method is used to define how the
server should respond to various system signals, such as SIGINT and SIGTERM.
"""
...
class AdditionalServer(TypedDict):
"""
@ -257,13 +250,6 @@ class Server:
info=self._info,
**server["kwargs"],
)
try:
addin_server.install_signal_handlers = lambda: None # type: ignore
except Exception:
logger.debug(
"Additional server does not have a method called "
"'install_signal_handlers'."
)
server_name = (
addin_server.__module__ + "." + addin_server.__class__.__name__