Skip to content

Commit 50eb268

Browse files
committed
refactor: simplify async command decorator in CLI
- Removed context passing in the async_command decorator for cleaner function signature - Improved readability by streamlining the wrapper function
1 parent 37b0eef commit 50eb268

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/yokedcache/cli.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,8 @@ def async_command(f):
5050
"""Decorator to handle async commands."""
5151

5252
@functools.wraps(f)
53-
@click.pass_context
54-
def wrapper(ctx, *args, **kwargs):
55-
return asyncio.run(f(ctx, *args, **kwargs))
53+
def wrapper(*args, **kwargs):
54+
return asyncio.run(f(*args, **kwargs))
5655

5756
return wrapper
5857

0 commit comments

Comments
 (0)