kaxil commented on a change in pull request #18718:
URL: https://github.com/apache/airflow/pull/18718#discussion_r730107853
##########
File path: airflow/models/connection.py
##########
@@ -289,8 +289,11 @@ def rotate_fernet_key(self):
if self._extra and self.is_extra_encrypted:
self._extra = fernet.rotate(self._extra.encode('utf-8')).decode()
- def get_hook(self):
- """Return hook based on conn_type."""
+ def get_hook(self, **kwargs):
Review comment:
Why not just have `hook_kwargs` as a keyword arg as the following:
```suggestion
def get_hook(self, *, hook_kwargs=None):
```
and then L311 can become:
```diff
- return hook_class(**{conn_id_param: self.conn_id}, **kwargs)
+ return hook_class(**{conn_id_param: self.conn_id}, **hook_kwargs)
```
--
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]