From dcdd886067533042512650b37c34a1e3fb26b8cc Mon Sep 17 00:00:00 2001 From: Otto Date: Tue, 3 Feb 2026 12:29:31 +0000 Subject: [PATCH] chore: remove docstrings and use sorted() for deterministic UUID ordering --- .../backend/backend/util/validation.py | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/autogpt_platform/backend/backend/util/validation.py b/autogpt_platform/backend/backend/util/validation.py index 3c22bc3c4c..a888cdcf11 100644 --- a/autogpt_platform/backend/backend/util/validation.py +++ b/autogpt_platform/backend/backend/util/validation.py @@ -9,24 +9,8 @@ _UUID_V4_PATTERN = re.compile( def is_uuid_v4(text: str) -> bool: - """Check if text is a valid UUID v4. - - Args: - text: String to validate - - Returns: - True if the text is a valid UUID v4, False otherwise - """ return bool(_UUID_V4_PATTERN.fullmatch(text.strip())) def extract_uuids(text: str) -> list[str]: - """Extract all UUID v4 strings from text. - - Args: - text: String to search for UUIDs - - Returns: - List of unique UUIDs found (lowercase) - """ - return list({m.lower() for m in _UUID_V4_PATTERN.findall(text)}) + return sorted({m.lower() for m in _UUID_V4_PATTERN.findall(text)})