Skip to content

Commit d993f93

Browse files
committed
syntax
1 parent 7413e61 commit d993f93

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/service-library/src/servicelib/redis/_decorators.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ def exclusive(
4646
msg = "lock_key cannot be empty string!"
4747
raise ValueError(msg)
4848

49-
def decorator(
49+
def _decorator(
5050
func: Callable[P, Coroutine[Any, Any, R]],
5151
) -> Callable[P, Coroutine[Any, Any, R]]:
5252
@functools.wraps(func)
53-
async def wrapper(*args: P.args, **kwargs: P.kwargs) -> R:
53+
async def _wrapper(*args: P.args, **kwargs: P.kwargs) -> R:
5454
redis_lock_key = (
5555
lock_key(*args, **kwargs) if callable(lock_key) else lock_key
5656
)
@@ -110,6 +110,6 @@ async def wrapper(*args: P.args, **kwargs: P.kwargs) -> R:
110110
# this would raise again and is not necessary
111111
await lock.release()
112112

113-
return wrapper
113+
return _wrapper
114114

115-
return decorator
115+
return _decorator

0 commit comments

Comments
 (0)