Skip to content
Snippets Groups Projects
Commit 0879577a authored by KERDREUX Jerome's avatar KERDREUX Jerome
Browse files

get_uuid() uuid can be None

parent 775f2c49
No related branches found
No related tags found
1 merge request!1First try of type hints
...@@ -78,7 +78,7 @@ def get_random_base_uuid(digit=2) -> UUID: ...@@ -78,7 +78,7 @@ def get_random_base_uuid(digit=2) -> UUID:
return UUID.random_base(digit) return UUID.random_base(digit)
def get_uuid(val: Union[UUID, str, None]) -> Optional[UUID]: def get_uuid(val: Union[UUID, str]) -> Optional[UUID]:
if isinstance(val, UUID): if isinstance(val, UUID):
return val return val
if isinstance(val, str): if isinstance(val, str):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment