From 619d7e9fef5e129e73bae730ae63e6439d628104 Mon Sep 17 00:00:00 2001 From: Kumi Date: Sun, 18 Feb 2024 13:19:03 +0100 Subject: [PATCH] Ensure EXPIRY_DAYS is an integer from env variable Casting `CHORES_EXPIRY_DAYS` environment variable to int ensures that the expiry days value is correctly interpreted for use throughout the application without type errors. This small but critical change guarantees consistent behavior when dealing with time-based logic. No issue reference provided. --- scripts/chores.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/chores.py b/scripts/chores.py index 865d476..deebe4f 100644 --- a/scripts/chores.py +++ b/scripts/chores.py @@ -18,7 +18,7 @@ except KeyError: ASSIGNEES = os.environ.get("CHORES_ASSIGNEES", "").split() REPO_OWNER = os.environ.get("CHORES_REPO_OWNER", "PrivateCoffee") REPO_NAME = os.environ.get("CHORES_REPO_NAME", "chores") -EXPIRY_DAYS = os.environ.get("CHORES_EXPIRY_DAYS", 2) +EXPIRY_DAYS = int(os.environ.get("CHORES_EXPIRY_DAYS", 2)) CHORES = os.environ.get( "CHORES_TEXT", "Looks like you forgot to set the CHORES_TEXT environment variable." )