Skip to content

Commit

Permalink
Work around tenacity annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
uranusjr committed Dec 26, 2023
1 parent 4ad8192 commit 8101207
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion airflow/providers/http/hooks/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,9 @@ 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)
# Work around "Never not callable" error in Mypy 1.8.
# This is probably an annotation issue in tenacity? Not entirely sure.
self._retry_obj: Any = tenacity.Retrying(**_retry_args)

return self._retry_obj(self.run, *args, **kwargs)

Expand Down

0 comments on commit 8101207

Please sign in to comment.