refactor: format

Signed-off-by: Adam Tao <tcx4c70@gmail.com>
This commit is contained in:
Adam Tao
2025-08-10 22:28:31 +08:00
parent 635cb8e3ff
commit 7bd7559bfe
3 changed files with 5 additions and 3 deletions
+2
View File
@@ -500,6 +500,7 @@ def deduplicate(interval: float = 10.0):
:param interval: Duration in seconds to wait before allowing the function to be called again.
"""
def decorator(func):
last_calls = {}
lock = threading.Lock()
@@ -514,6 +515,7 @@ def deduplicate(interval: float = 10.0):
return None
last_calls[key] = now
return func(*args, **kwargs)
return wrapper
return decorator