From 5a26b6697ee587d570abec2463ae35789c3bf195 Mon Sep 17 00:00:00 2001 From: wbenbihi Date: Thu, 25 Aug 2022 13:36:43 +0800 Subject: [PATCH] [FIX](handlers) return value for __call__ --- hourglass_tensorflow/handlers/meta.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hourglass_tensorflow/handlers/meta.py b/hourglass_tensorflow/handlers/meta.py index 08b9697..c8e02d0 100644 --- a/hourglass_tensorflow/handlers/meta.py +++ b/hourglass_tensorflow/handlers/meta.py @@ -22,7 +22,7 @@ def __init__( self._executed = False self.init_handler(*args, **kwargs) - def __call__(self, *args, **kwargs) -> None: + def __call__(self: Self, *args, **kwargs) -> Self: if not self._executed: self.run(*args, **kwargs) self.executed = True @@ -30,6 +30,7 @@ def __call__(self, *args, **kwargs) -> None: self.warning( f"This {self.__class__.__name__} has already been executed. Use self.reset" ) + return self def __repr__(self) -> str: return f""