diff libervia/backend/tools/async_trigger.py @ 4270:0d7bb4df2343

Reformatted code base using black.
author Goffi <goffi@goffi.org>
date Wed, 19 Jun 2024 18:44:57 +0200
parents e11b13418ba6
children
line wrap: on
line diff
--- a/libervia/backend/tools/async_trigger.py	Tue Jun 18 12:06:45 2024 +0200
+++ b/libervia/backend/tools/async_trigger.py	Wed Jun 19 18:44:57 2024 +0200
@@ -26,14 +26,11 @@
 from . import utils
 from twisted.internet import defer
 
+
 class TriggerManager(sync_trigger.TriggerManager):
     """This is a TriggerManager with an new async_point method"""
 
-    async def async_point(
-        self,
-        point_name: str,
-        *args, **kwargs
-    ) -> bool:
+    async def async_point(self, point_name: str, *args, **kwargs) -> bool:
         """This put a trigger point with potentially async Deferred
 
         All the triggers for that point will be run
@@ -48,7 +45,7 @@
         if point_name not in self.__triggers:
             return True
 
-        can_cancel = not kwargs.pop('triggers_no_cancel', False)
+        can_cancel = not kwargs.pop("triggers_no_cancel", False)
 
         for __, trigger in self.__triggers[point_name]:
             try:
@@ -60,9 +57,7 @@
         return True
 
     async def async_return_point(
-        self,
-        point_name: str,
-        *args, **kwargs
+        self, point_name: str, *args, **kwargs
     ) -> Tuple[bool, Any]:
         """Async version of return_point"""
         if point_name not in self.__triggers:
@@ -76,4 +71,3 @@
             except sync_trigger.SkipOtherTriggers:
                 break
         return True, None
-