Skip to content

Commit 1708401

Browse files
better
1 parent be0fc4d commit 1708401

File tree

1 file changed

+3
-15
lines changed
  • src/rb-api/rb/api/routes

1 file changed

+3
-15
lines changed

src/rb-api/rb/api/routes/cli.py

+3-15
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def command_callback(command: typer.models.CommandInfo):
2929
# Get the original callback signature
3030
original_signature = inspect.signature(command.callback)
3131

32-
# Modify the signature to include `streaming` and `help` parameters
32+
# Modify the signature to include `streaming`
3333
new_params = list(original_signature.parameters.values())
3434
new_params.append(
3535
inspect.Parameter(
@@ -39,26 +39,14 @@ def command_callback(command: typer.models.CommandInfo):
3939
annotation=Optional[bool],
4040
)
4141
)
42-
new_params.append(
43-
inspect.Parameter(
44-
"help",
45-
inspect.Parameter.KEYWORD_ONLY,
46-
default=False,
47-
annotation=Optional[bool],
48-
)
49-
)
5042
new_signature = original_signature.replace(parameters=new_params)
5143

5244
# Create a new function with the modified signature
5345
@with_signature(new_signature)
5446
def wrapper(*args, **kwargs):
5547
# Extract additional parameters
56-
help = kwargs.pop("help", False)
57-
58-
if help:
59-
return CommandResult(
60-
result=command.callback.__doc__, stdout=[], success=True, error=None
61-
)
48+
# TODO(Jagath): Implement streaming
49+
streaming = kwargs.pop("streaming", False) # noqa: F841
6250

6351
# Call the static endpoint with the wrapped callback and arguments
6452
result = static_endpoint(command.callback, *args, **kwargs)

0 commit comments

Comments
 (0)