uranusjr commented on code in PR #29206:
URL: https://github.com/apache/airflow/pull/29206#discussion_r1136503816
##########
airflow/providers/http/hooks/http.py:
##########
@@ -102,6 +113,10 @@ def get_conn(self, headers: dict[Any, Any] | None = None)
-> requests.Session:
self.base_url = self.base_url + ":" + str(conn.port)
if conn.login:
session.auth = self.auth_type(conn.login, conn.password)
+ elif self._auth_type and self.auth_args:
+ session.auth = self.auth_type(*self.auth_args)
+ elif self._auth_type:
+ session.auth = self.auth_type()
Review Comment:
I feel it’s good enough to remove `self.auth_args` and simply do
`self.auth_type()` here. The user can always use `functools.partial()` if
arguments are needed; I think this fits how Python generally design these sort
of things. (We should mention this in the docstring, of course.)
--
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]