This is an automated email from the ASF dual-hosted git repository.

kaxilnaik pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new d2f62d7cd5 Simplify dict logic in Hashicorp Vault Hook (#30060)
d2f62d7cd5 is described below

commit d2f62d7cd5c2b2c141b5db5594a95e6bf0148442
Author: Tzu-ping Chung <uranu...@gmail.com>
AuthorDate: Tue Mar 14 04:02:38 2023 +0800

    Simplify dict logic in Hashicorp Vault Hook (#30060)
    
    This extra dict() is entirely redundant.
---
 airflow/providers/hashicorp/hooks/vault.py | 46 ++++++++++++++----------------
 1 file changed, 22 insertions(+), 24 deletions(-)

diff --git a/airflow/providers/hashicorp/hooks/vault.py 
b/airflow/providers/hashicorp/hooks/vault.py
index 36022d4141..0ef8f94cd0 100644
--- a/airflow/providers/hashicorp/hooks/vault.py
+++ b/airflow/providers/hashicorp/hooks/vault.py
@@ -209,30 +209,28 @@ class VaultHook(BaseHook):
         mount_point = self.connection.schema if self.connection.schema else 
"secret"
 
         client_kwargs.update(
-            **dict(
-                url=url,
-                auth_type=auth_type,
-                auth_mount_point=auth_mount_point,
-                mount_point=mount_point,
-                kv_engine_version=kv_engine_version,
-                token=self.connection.password,
-                token_path=token_path,
-                username=self.connection.login,
-                password=self.connection.password,
-                key_id=self.connection.login,
-                secret_id=self.connection.password,
-                role_id=role_id,
-                kubernetes_role=kubernetes_role,
-                kubernetes_jwt_path=kubernetes_jwt_path,
-                gcp_key_path=gcp_key_path,
-                gcp_keyfile_dict=gcp_keyfile_dict,
-                gcp_scopes=gcp_scopes,
-                azure_tenant_id=azure_tenant_id,
-                azure_resource=azure_resource,
-                radius_host=radius_host,
-                radius_secret=self.connection.password,
-                radius_port=radius_port,
-            )
+            url=url,
+            auth_type=auth_type,
+            auth_mount_point=auth_mount_point,
+            mount_point=mount_point,
+            kv_engine_version=kv_engine_version,
+            token=self.connection.password,
+            token_path=token_path,
+            username=self.connection.login,
+            password=self.connection.password,
+            key_id=self.connection.login,
+            secret_id=self.connection.password,
+            role_id=role_id,
+            kubernetes_role=kubernetes_role,
+            kubernetes_jwt_path=kubernetes_jwt_path,
+            gcp_key_path=gcp_key_path,
+            gcp_keyfile_dict=gcp_keyfile_dict,
+            gcp_scopes=gcp_scopes,
+            azure_tenant_id=azure_tenant_id,
+            azure_resource=azure_resource,
+            radius_host=radius_host,
+            radius_secret=self.connection.password,
+            radius_port=radius_port,
         )
 
         self.vault_client = _VaultClient(**client_kwargs)

Reply via email to