@@ -57,7 +57,9 @@ def cli_context(
57
57
@click .option ("--force" , is_flag = True , hidden = True )
58
58
@click .option ("--no-skip" , is_flag = True , hidden = True )
59
59
@click .option ("--draft" , is_flag = True , hidden = True )
60
- @click .option ("--direct" , is_flag = True , hidden = True )
60
+ @click .option (
61
+ "--direct/--no-direct" , "direct_opt" , is_flag = True , hidden = True , default = None
62
+ )
61
63
@click .option ("--base" , "-B" , default = None , hidden = True )
62
64
@click .option ("--stack/--no-stack" , "-s/-S" , is_flag = True , default = True , hidden = True )
63
65
def main (
@@ -67,7 +69,7 @@ def main(
67
69
update_fields : bool ,
68
70
short : bool ,
69
71
force : bool ,
70
- direct : bool ,
72
+ direct_opt : Optional [ bool ] ,
71
73
no_skip : bool ,
72
74
draft : bool ,
73
75
base : Optional [str ],
@@ -89,7 +91,7 @@ def main(
89
91
draft = draft ,
90
92
base = base ,
91
93
stack = stack ,
92
- direct = direct ,
94
+ direct_opt = direct_opt ,
93
95
)
94
96
95
97
@@ -226,7 +228,11 @@ def status(pull_request: str) -> None:
226
228
"listed in the command line." ,
227
229
)
228
230
@click .option (
229
- "--direct" , is_flag = True , help = "Create stack that directly merges into master"
231
+ "--direct/--no-direct" ,
232
+ "direct_opt" ,
233
+ default = None ,
234
+ is_flag = True ,
235
+ help = "Create stack that directly merges into master" ,
230
236
)
231
237
@click .argument (
232
238
"revs" ,
@@ -240,7 +246,7 @@ def submit(
240
246
force : bool ,
241
247
no_skip : bool ,
242
248
draft : bool ,
243
- direct : bool ,
249
+ direct_opt : Optional [ bool ] ,
244
250
base : Optional [str ],
245
251
revs : Tuple [str , ...],
246
252
stack : bool ,
@@ -264,7 +270,7 @@ def submit(
264
270
base_opt = base ,
265
271
revs = revs ,
266
272
stack = stack ,
267
- direct = direct ,
273
+ direct_opt = direct_opt ,
268
274
)
269
275
270
276
0 commit comments