Skip to content

Commit

Permalink
workaround for Never not callable
Browse files Browse the repository at this point in the history
  • Loading branch information
hussein-awala committed Dec 26, 2023
1 parent 8101207 commit 407a197
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions airflow/providers/http/hooks/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,9 @@ def run_with_advanced_retry(self, _retry_args: dict[Any, Any], *args: Any, **kwa
"""
# 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)
retrying = tenacity.Retrying(**_retry_args)
self._retry_obj = retrying
return retrying(self.run, *args, **kwargs)

def url_from_endpoint(self, endpoint: str | None) -> str:
"""Combine base url with endpoint."""
Expand Down

0 comments on commit 407a197

Please sign in to comment.