From 75541103b78ac2f70b33128cee3b416f71d3611d Mon Sep 17 00:00:00 2001 From: jkerdreux-imt <jerome.kerdreux@imt-atlantique.fr> Date: Mon, 25 Nov 2024 18:05:37 +0100 Subject: [PATCH] Format --- libs/lib/xaal/lib/bindings.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/libs/lib/xaal/lib/bindings.py b/libs/lib/xaal/lib/bindings.py index aa4a5c38..6af87aa5 100644 --- a/libs/lib/xaal/lib/bindings.py +++ b/libs/lib/xaal/lib/bindings.py @@ -2,12 +2,13 @@ import uuid from .exceptions import UUIDError + class UUID: def __init__(self, *args, **kwargs): self.__uuid = uuid.UUID(*args, **kwargs) @staticmethod - def random_base(digit=2) -> 'UUID': + def random_base(digit=2) -> "UUID": """zeros the last digits of a random uuid, usefull w/ you want to forge some addresses two digit is great. """ @@ -19,15 +20,15 @@ class UUID: raise UUIDError @staticmethod - def random() -> 'UUID': + def random() -> "UUID": tmp = uuid.uuid1().int return UUID(int=tmp) - def __add__(self, value:int) -> 'UUID': + def __add__(self, value: int) -> "UUID": tmp = self.__uuid.int + value return UUID(int=tmp) - def __sub__(self, value:int) -> 'UUID': + def __sub__(self, value: int) -> "UUID": tmp = self.__uuid.int - value return UUID(int=tmp) @@ -52,7 +53,7 @@ class UUID: def get(self) -> uuid.UUID: return self.__uuid - def set(self, value:uuid.UUID): + def set(self, value: uuid.UUID): self.__uuid = value @property -- GitLab