You've already forked STARK
mirror of
https://github.com/MarkParker5/STARK.git
synced 2025-07-02 22:36:54 +02:00
14 lines
277 B
Python
14 lines
277 B
Python
from typing import Optional
|
|
import uuid
|
|
|
|
class UUID(uuid.UUID):
|
|
|
|
def __new__(cls, string: Optional[str] = None):
|
|
if string:
|
|
return super().__new__(cls)
|
|
else:
|
|
return uuid.uuid1()
|
|
|
|
def __str__(self) -> str:
|
|
return self.hex
|