clan-lib: Move task functions to own file
This commit is contained in:
@@ -32,20 +32,6 @@ class FileRequest:
|
|||||||
initial_folder: str | None = field(default=None)
|
initial_folder: str | None = field(default=None)
|
||||||
|
|
||||||
|
|
||||||
@API.register_abstract
|
|
||||||
def cancel_task(task_id: str) -> None:
|
|
||||||
"""Cancel a task by its op_key."""
|
|
||||||
msg = "cancel_task() is not implemented"
|
|
||||||
raise NotImplementedError(msg)
|
|
||||||
|
|
||||||
|
|
||||||
@API.register_abstract
|
|
||||||
def list_tasks() -> list[str]:
|
|
||||||
"""List all tasks."""
|
|
||||||
msg = "list_tasks() is not implemented"
|
|
||||||
raise NotImplementedError(msg)
|
|
||||||
|
|
||||||
|
|
||||||
@API.register_abstract
|
@API.register_abstract
|
||||||
def open_file(file_request: FileRequest) -> list[str] | None:
|
def open_file(file_request: FileRequest) -> list[str] | None:
|
||||||
"""
|
"""
|
||||||
|
|||||||
15
pkgs/clan-cli/clan_lib/api/tasks.py
Normal file
15
pkgs/clan-cli/clan_lib/api/tasks.py
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
from clan_lib.api import API
|
||||||
|
|
||||||
|
|
||||||
|
@API.register_abstract
|
||||||
|
def cancel_task(task_id: str) -> None:
|
||||||
|
"""Cancel a task by its op_key."""
|
||||||
|
msg = "cancel_task() is not implemented"
|
||||||
|
raise NotImplementedError(msg)
|
||||||
|
|
||||||
|
|
||||||
|
@API.register_abstract
|
||||||
|
def list_tasks() -> list[str]:
|
||||||
|
"""List all tasks."""
|
||||||
|
msg = "list_tasks() is not implemented"
|
||||||
|
raise NotImplementedError(msg)
|
||||||
Reference in New Issue
Block a user