-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
# todo add to osbot utils | ||
from osbot_utils.utils.Misc import random_guid | ||
from osbot_utils.utils.Misc import random_guid, is_guid | ||
|
||
|
||
class Random_Guid(str): | ||
def __new__(cls, value=None): | ||
if value is None: | ||
value = random_guid() | ||
return str.__new__(cls, value) | ||
|
||
def __init__(self, value=None): | ||
self.value = value if value is not None else random_guid() | ||
if is_guid(value): | ||
return str.__new__(cls, value) | ||
raise ValueError(f'in Random_Guid: value provided was not a Guid: {value}') | ||
|
||
def __str__(self): | ||
return self |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v1.63.0 | ||
v1.63.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "osbot_utils" | ||
version = "v1.63.0" | ||
version = "v1.63.1" | ||
description = "OWASP Security Bot - Utils" | ||
authors = ["Dinis Cruz <[email protected]>"] | ||
license = "MIT" | ||
|