potiuk commented on code in PR #36428:
URL: https://github.com/apache/airflow/pull/36428#discussion_r1436635108


##########
airflow/providers/http/hooks/http.py:
##########
@@ -242,9 +243,11 @@ def run_with_advanced_retry(self, _retry_args: dict[Any, 
Any], *args: Any, **kwa
             hook.run_with_advanced_retry(endpoint="v1/test", 
_retry_args=retry_args)
 
         """
-        self._retry_obj = tenacity.Retrying(**_retry_args)
-
-        return self._retry_obj(self.run, *args, **kwargs)
+        # Work around "Never not callable" error in Mypy 1.8.
+        # This is probably an annotation issue in tenacity? Not entirely sure.
+        retrying = tenacity.Retrying(**_retry_args)
+        self._retry_obj = retrying
+        return retrying(self.run, *args, **kwargs)

Review Comment:
   Maybe a good idea to open an issue to tenacity ? Last time when I did it, 
they fixed it really quickly https://github.com/jd/tenacity/issues/389



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to