style: highligh __del__ methods in formatting

This commit is contained in:
2023-11-13 12:16:30 +02:00
parent e823fd3f27
commit eb6eda578c
3 changed files with 17 additions and 12 deletions

View File

@ -65,6 +65,14 @@ class TriggerLoader(LazyLogging):
self._on_stop_requested = False
self.triggers: list[Trigger] = []
def __del__(self) -> None:
"""
custom destructor object which calls on_stop in case if it was requested
"""
if not self._on_stop_requested:
return
self.on_stop()
@classmethod
def load(cls, repository_id: RepositoryId, configuration: Configuration) -> Self:
"""
@ -257,11 +265,3 @@ class TriggerLoader(LazyLogging):
for trigger in self.triggers:
with self.__execute_trigger(trigger):
trigger.on_stop()
def __del__(self) -> None:
"""
custom destructor object which calls on_stop in case if it was requested
"""
if not self._on_stop_requested:
return
self.on_stop()