Repository: apache/airflow
File: providers/hashicorp/src/airflow/providers/hashicorp/hooks/vault.py (Python)

Code before:
    :param jwt_token: JWT token for Authentication (for ``jwt`` auth_type)
    :param jwt_token_path: Path to file containing JWT token for Authentication (for ``jwt`` auth_type,
            default: ``/var/run/secrets/kubernetes.io/serviceaccount/token``)
    """

    conn_name_attr = "vault_conn_id"
    default_conn_name = "vault_default"
    conn_type = "vault"
    hook_name = "Hashicorp Vault"

    def __init__(
        self,
        vault_conn_id: str = default_conn_name,
        auth_type: str | None = None,
        auth_mount_point: str | None = None,
        kv_engine_version: int | None = None,
        role_id: str | None = None,
        region: str | None = None,
        kubernetes_role: str | None = None,
        kubernetes_jwt_path: str | None = None,
        token_path: str | None = None,
        gcp_key_path: str | None = None,
        gcp_scopes: str | None = None,
        azure_tenant_id: str | None = None,
        azure_resource: str | None = None,
        radius_host: str | None = None,
        radius_port: int | None = None,
        jwt_role: str | None = None,
        jwt_token: str | None = None,
        jwt_token_path: str | None = None,
        **kwargs,
    ):
        super().__init__()
        self.connection = self.get_connection(vault_conn_id)

        if not auth_type:
            auth_type = self.connection.extra_dejson.get("auth_type") or "token"

        if not auth_mount_point:
            auth_mount_point = self.connection.extra_dejson.get("auth_mount_point")

        if not kv_engine_version:
            conn_version = self.connection.extra_dejson.get("kv_engine_version")
            try:
                kv_engine_version = int(conn_version) if conn_version else DEFAULT_KV_ENGINE_VERSION
            except ValueError:
                raise VaultError(f"The version is not an int: {conn_version}. ")

        client_kwargs = self.connection.extra_dejson.get("client_kwargs", {})

        if kwargs:

Review comment (suggestion):
```suggestion
        *,
        jwt_role: str | None = None,
```

Code after:
    :param jwt_token_path: Path to file containing JWT token for Authentication (for ``jwt`` auth_type).
    """

    conn_name_attr = "vault_conn_id"
    default_conn_name = "vault_default"
    conn_type = "vault"
    hook_name = "Hashicorp Vault"

    def __init__(
        self,
        vault_conn_id: str = default_conn_name,
        auth_type: str | None = None,
        auth_mount_point: str | None = None,
        kv_engine_version: int | None = None,
        role_id: str | None = None,
        region: str | None = None,
        kubernetes_role: str | None = None,
        kubernetes_jwt_path: str | None = None,
        token_path: str | None = None,
        gcp_key_path: str | None = None,
        gcp_scopes: str | None = None,
        azure_tenant_id: str | None = None,
        azure_resource: str | None = None,
        radius_host: str | None = None,
        radius_port: int | None = None,
        jwt_role: str | None = None,
        jwt_token: str | None = None,
        jwt_token_path: str | None = None,
        **kwargs,
    ):
        super().__init__()
        self.connection = self.get_connection(vault_conn_id)

        if not auth_type:
            auth_type = self.connection.extra_dejson.get("auth_type") or "token"

        if not auth_mount_point:
            auth_mount_point = self.connection.extra_dejson.get("auth_mount_point")

        if not kv_engine_version:
            conn_version = self.connection.extra_dejson.get("kv_engine_version")
            try:
                kv_engine_version = int(conn_version) if conn_version else DEFAULT_KV_ENGINE_VERSION
            except ValueError:
                raise VaultError(f"The version is not an int: {conn_version}. ")

        client_kwargs = self.connection.extra_dejson.get("client_kwargs", {})

        if kwargs:
            client_kwargs = merge_dicts(client_kwargs, kwargs)