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
Branches
Tags
1 merge request!1First try of type hints
......@@ -78,7 +78,7 @@ def get_random_base_uuid(digit=2) -> UUID:
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):
return val
if isinstance(val, str):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment