mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-02-03 19:35:15 -05:00
chore: remove docstrings and use sorted() for deterministic UUID ordering
This commit is contained in:
@@ -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)})
|
||||
|
||||
Reference in New Issue
Block a user