chore: remove docstrings and use sorted() for deterministic UUID ordering

This commit is contained in:
Otto
2026-02-03 12:29:31 +00:00
parent 6098c5eed6
commit dcdd886067

View File

@@ -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)})