@@ -29,7 +29,7 @@ def command_callback(command: typer.models.CommandInfo):
29
29
# Get the original callback signature
30
30
original_signature = inspect .signature (command .callback )
31
31
32
- # Modify the signature to include `streaming` and `help` parameters
32
+ # Modify the signature to include `streaming`
33
33
new_params = list (original_signature .parameters .values ())
34
34
new_params .append (
35
35
inspect .Parameter (
@@ -39,26 +39,14 @@ def command_callback(command: typer.models.CommandInfo):
39
39
annotation = Optional [bool ],
40
40
)
41
41
)
42
- new_params .append (
43
- inspect .Parameter (
44
- "help" ,
45
- inspect .Parameter .KEYWORD_ONLY ,
46
- default = False ,
47
- annotation = Optional [bool ],
48
- )
49
- )
50
42
new_signature = original_signature .replace (parameters = new_params )
51
43
52
44
# Create a new function with the modified signature
53
45
@with_signature (new_signature )
54
46
def wrapper (* args , ** kwargs ):
55
47
# 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
62
50
63
51
# Call the static endpoint with the wrapped callback and arguments
64
52
result = static_endpoint (command .callback , * args , ** kwargs )
0 commit comments