diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2023-01-29 20:02:53 +0100 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2024-02-18 11:32:53 +0100 |
commit | 1db04ff63d4f62f88f0e56bd0233290ef7c9dd95 (patch) | |
tree | b1bc647d2e5bf563881ce820d2376965336ab335 /slack/task.py | |
parent | 6ca6e00bda3259d83f69d831093fe124c4c31f47 (diff) | |
download | wee-slack-1db04ff63d4f62f88f0e56bd0233290ef7c9dd95.tar.gz |
Replace some usages of Any with proper types
Diffstat (limited to 'slack/task.py')
-rw-r--r-- | slack/task.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/slack/task.py b/slack/task.py index 763f605..0209be4 100644 --- a/slack/task.py +++ b/slack/task.py @@ -80,7 +80,7 @@ class Task(Future[T]): return f"{self.__class__.__name__}('{self.id}', coroutine={self.coroutine.__qualname__})" -def weechat_task_cb(data: str, *args: Any) -> int: +def weechat_task_cb(data: str, *args: object) -> int: future = shared.active_futures.pop(data) future.set_result(args) tasks = shared.active_tasks.pop(data) @@ -89,7 +89,7 @@ def weechat_task_cb(data: str, *args: Any) -> int: return weechat.WEECHAT_RC_OK -def process_ended_task(task: Task[Any], response: Any): +def process_ended_task(task: Task[Any], response: object): task.set_result(response) if task.id in shared.active_tasks: tasks = shared.active_tasks.pop(task.id) @@ -99,7 +99,7 @@ def process_ended_task(task: Task[Any], response: Any): del shared.active_futures[task.id] -def task_runner(task: Task[Any], response: Any): +def task_runner(task: Task[Any], response: object): while True: try: future = task.coroutine.send(response) |