Compare commits
1 Commits
a421ef8473
...
aa0522acf8
| Author | SHA1 | Date | |
|---|---|---|---|
|
aa0522acf8
|
@@ -12,6 +12,20 @@ settings, user/room information, and notifications/logging.
|
||||
"""
|
||||
from typing import Protocol
|
||||
|
||||
# Callback Protocols
|
||||
# -----------------
|
||||
class CommandCallback(Protocol):
|
||||
"""Protocol for command callbacks accepting variable string arguments."""
|
||||
def __call__(self, *command_parameters: str) -> None: ...
|
||||
|
||||
class TimedCallback(Protocol):
|
||||
"""Protocol for timed callbacks accepting no arguments."""
|
||||
def __call__(self) -> None: ...
|
||||
|
||||
class WindowCallback(Protocol):
|
||||
"""Protocol for window callbacks accepting a window ID and message."""
|
||||
def __call__(self, win_id: str, message: str) -> None: ...
|
||||
|
||||
# Console Functions
|
||||
# -----------------
|
||||
|
||||
@@ -1191,17 +1205,3 @@ def log_error(message: str) -> None:
|
||||
prof.log_error("Failed to connect to server")
|
||||
"""
|
||||
pass
|
||||
|
||||
# Callback Protocols
|
||||
# -----------------
|
||||
class CommandCallback(Protocol):
|
||||
"""Protocol for command callbacks accepting variable string arguments."""
|
||||
def __call__(self, *command_parameters: str) -> None: ...
|
||||
|
||||
class TimedCallback(Protocol):
|
||||
"""Protocol for timed callbacks accepting no arguments."""
|
||||
def __call__(self) -> None: ...
|
||||
|
||||
class WindowCallback(Protocol):
|
||||
"""Protocol for window callbacks accepting a window ID and message."""
|
||||
def __call__(self, win_id: str, message: str) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user