Skip to content

Commit

Permalink
fixed incompatibility with python3.8
Browse files Browse the repository at this point in the history
resolved #44
  • Loading branch information
Fallen-Breath committed Sep 17, 2024
1 parent badeb2d commit daf6a72
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion prime_backup/mcdr/task_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def shutdown(self):

# ================================== Interfaces ==================================

def add_task(self, task: Task[_T], callback: Optional[TaskCallback[_T]] = None, *, handle_tmo_err: bool = True) -> futures.Future[_T]:
def add_task(self, task: Task[_T], callback: Optional[TaskCallback[_T]] = None, *, handle_tmo_err: bool = True) -> 'futures.Future[_T]':
source = task.source
holder = TaskHolder(task, source, callback)
if isinstance(task, HeavyTask):
Expand Down
2 changes: 1 addition & 1 deletion prime_backup/mcdr/task_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class TaskHolder(Generic[_T]):
task: 'Task[_T]'
source: 'CommandSource'
callback: Optional[TaskCallback[_T]]
future: futures.Future[_T] = dataclasses.field(default_factory=futures.Future)
future: 'futures.Future[_T]' = dataclasses.field(default_factory=futures.Future)

def task_name(self) -> RTextBase:
return self.task.get_name_text()
Expand Down

0 comments on commit daf6a72

Please sign in to comment.