From 7784fbdf17b30f04e1ef9e2f5f6716be4f989542 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Sun, 15 Mar 2026 19:53:36 +0100 Subject: [PATCH] [PR #11603/c8fe1e57 backport][stable-12] Fix typing imports (#11607) Fix typing imports (#11603) Fix typing imports. (cherry picked from commit c8fe1e571f46858dd6197ecb1060cfffc3b2e93d) Co-authored-by: Felix Fontein --- plugins/modules/github_secrets.py | 8 ++++---- plugins/modules/keycloak_authentication_v2.py | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/plugins/modules/github_secrets.py b/plugins/modules/github_secrets.py index 7390d37fa9..b990ed75f9 100644 --- a/plugins/modules/github_secrets.py +++ b/plugins/modules/github_secrets.py @@ -100,8 +100,8 @@ result: """ import json +import typing as t from http import HTTPStatus -from typing import Any from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.urls import fetch_url @@ -180,7 +180,7 @@ def upsert_secret( key: str, encrypted_value: str, key_id: str, -) -> dict[str, Any]: +) -> dict[str, t.Any]: """Create or update a GitHub Actions secret.""" url = ( f"{api_url}/repos/{organization}/{repository}/actions/secrets/{key}" @@ -236,7 +236,7 @@ def delete_secret( organization: str, repository: str, key: str, -) -> dict[str, Any]: +) -> dict[str, t.Any]: """Delete a GitHub Actions secret.""" url = ( f"{api_url}/repos/{organization}/{repository}/actions/secrets/{key}" @@ -323,7 +323,7 @@ def main() -> None: params=module.params, ) - result: dict[str, Any] = {} + result: dict[str, t.Any] = {} headers = { "Accept": "application/vnd.github+json", diff --git a/plugins/modules/keycloak_authentication_v2.py b/plugins/modules/keycloak_authentication_v2.py index c6ab3f4a7e..79aaedad01 100644 --- a/plugins/modules/keycloak_authentication_v2.py +++ b/plugins/modules/keycloak_authentication_v2.py @@ -368,7 +368,7 @@ end_state: import copy import traceback -from typing import Any +import typing as t from ansible.module_utils.basic import AnsibleModule @@ -763,8 +763,8 @@ def delete_tmp_swap_flow_if_exists( kc.delete_authentication_flow_by_id(id=existing_tmp["id"], realm=realm) -def create_authentication_execution_spec_options(depth: int) -> dict[str, Any]: - options: dict[str, Any] = dict( +def create_authentication_execution_spec_options(depth: int) -> dict[str, t.Any]: + options: dict[str, t.Any] = dict( providerId=dict(type="str", required=depth == 0), requirement=dict(type="str", required=True, choices=["REQUIRED", "ALTERNATIVE", "DISABLED", "CONDITIONAL"]), authenticationConfig=dict(