From 17197e844a4b3561e41387709e7991702f95ee4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Sj=C3=B6gren?= Date: Sun, 15 Mar 2026 16:47:54 +0000 Subject: [PATCH] t is for typing, and typing is what we did MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Sjögren --- plugins/modules/github_secrets_info.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/plugins/modules/github_secrets_info.py b/plugins/modules/github_secrets_info.py index 2e0bc560e6..18ee05cc95 100644 --- a/plugins/modules/github_secrets_info.py +++ b/plugins/modules/github_secrets_info.py @@ -68,12 +68,20 @@ secrets: }, ] contains: - ... describe the fields inside the dictionaries here ... + name: + description: The name of the secret. + type: str + created_at: + description: The date and time when the secret was created. + type: str + updated_at: + description: The date and time when the secret was last updated. + type: str """ import json -from http import HTTPStatus import typing as t +from http import HTTPStatus from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.urls import fetch_url @@ -98,7 +106,7 @@ def list_secrets( if info["status"] == HTTPStatus.OK: body = resp.read() - return json.loads(body).get("secrets", []) + return {"secrets": json.loads(body).get("secrets", [])} elif info["status"] == HTTPStatus.NOT_FOUND: return { "secrets": [], @@ -132,7 +140,7 @@ def main() -> None: api_url: str = module.params["api_url"] token: str = module.params["token"] - result: dict[str, Any] = {} + result: dict[str, t.Any] = {} headers = { "Accept": "application/vnd.github+json",