← back to Exo
Remove Bad UUID Implementation
587a52a944aef0aa795e7975ced07a70bf7da0fa · 2025-06-28 14:08:18 +0100 · Arbion Halili
Files touched
D shared/unique_identifier.py
Diff
commit 587a52a944aef0aa795e7975ced07a70bf7da0fa
Author: Arbion Halili <99731180+ToxicPine@users.noreply.github.com>
Date: Sat Jun 28 14:08:18 2025 +0100
Remove Bad UUID Implementation
---
shared/unique_identifier.py | 25 -------------------------
1 file changed, 25 deletions(-)
diff --git a/shared/unique_identifier.py b/shared/unique_identifier.py
deleted file mode 100644
index 5c4508a0..00000000
--- a/shared/unique_identifier.py
+++ /dev/null
@@ -1,25 +0,0 @@
-import uuid
-from typing import Callable, TypeVar
-
-from pydantic import UUID4, BaseModel
-
-NT = TypeVar("NT", bound=str)
-type NewTypeGenerator[NT] = Callable[[str], NT]
-
-
-class _UuidValidator(BaseModel):
- id: UUID4
-
-
-def _generate_uuid() -> str:
- """Return a freshly generated RFC-4122 UUID version 4 in canonical string form."""
- return str(uuid.uuid4())
-
-
-def generate_uuid(type_wrapper: NewTypeGenerator[NT]) -> NT:
- return type_wrapper(_generate_uuid())
-
-
-def validate_uuid(data: str, type_wrapper: NewTypeGenerator[NT]) -> NT:
- validated_model = _UuidValidator.model_validate({"id": data})
- return type_wrapper(str(validated_model.id))
← 885c7d5c Add RULES.md and .cursorrules
·
back to Exo
·
Remove PoeThePoet 74adbc42 →