# HG changeset patch # User Goffi # Date 1652458796 -7200 # Node ID e14847bf65c0120c0fed8834f3e27eabb2306221 # Parent af485e8afe032157a054c466f584b055e611d2f3 tools (async_trigger): fix return value in `asyncReturnPoint` + typing hints diff -r af485e8afe03 -r e14847bf65c0 sat/tools/async_trigger.py --- a/sat/tools/async_trigger.py Fri May 13 18:02:37 2022 +0200 +++ b/sat/tools/async_trigger.py Fri May 13 18:19:56 2022 +0200 @@ -19,6 +19,7 @@ """Misc usefull classes""" +from typing import Tuple, Any from . import trigger as sync_trigger from . import utils from twisted.internet import defer @@ -53,10 +54,14 @@ break defer.returnValue(True) - async def asyncReturnPoint(self, point_name, *args, **kwargs): + async def asyncReturnPoint( + self, + point_name: str, + *args, **kwargs + ) -> Tuple[bool, Any]: """Async version of returnPoint""" if point_name not in self.__triggers: - return True + return True, None for priority, trigger in self.__triggers[point_name]: try: