23
23
_click_option_decorator_type = Callable [..., Any ]
24
24
25
25
26
- # TODO: make default, hidden, required params for everyone. Fix monkey patching, if needed
27
- def opt_api_key (default = None ) -> _click_option_decorator_type :
26
+ # TODO: Should we make " required" param universal for all options?
27
+ def opt_api_key (default = None , hidden = False ) -> _click_option_decorator_type :
28
28
"""
29
29
Click option for specifying an API key
30
30
"""
@@ -38,13 +38,14 @@ def decorator(function) -> _click_option_decorator_type:
38
38
default = default ,
39
39
show_envvar = True ,
40
40
show_default = True ,
41
+ hidden = hidden ,
41
42
)(function )
42
43
return function
43
44
44
45
return decorator
45
46
46
47
47
- def opt_audience (default = None , required = False ) -> _click_option_decorator_type :
48
+ def opt_audience (default = None , hidden = False , required = False ) -> _click_option_decorator_type :
48
49
"""
49
50
Click option for specifying an OAuth token audience for the
50
51
planet_auth package's click commands.
@@ -63,13 +64,14 @@ def decorator(function) -> _click_option_decorator_type:
63
64
show_envvar = True ,
64
65
show_default = True ,
65
66
required = required ,
67
+ hidden = hidden ,
66
68
)(function )
67
69
return function
68
70
69
71
return decorator
70
72
71
73
72
- def opt_client_id (default = None ) -> _click_option_decorator_type :
74
+ def opt_client_id (default = None , hidden = False ) -> _click_option_decorator_type :
73
75
"""
74
76
Click option for specifying an OAuth client ID.
75
77
"""
@@ -83,13 +85,14 @@ def decorator(function) -> _click_option_decorator_type:
83
85
default = default ,
84
86
show_envvar = True ,
85
87
show_default = True ,
88
+ hidden = hidden ,
86
89
)(function )
87
90
return function
88
91
89
92
return decorator
90
93
91
94
92
- def opt_client_secret (default = None ) -> _click_option_decorator_type :
95
+ def opt_client_secret (default = None , hidden = False ) -> _click_option_decorator_type :
93
96
"""
94
97
Click option for specifying an OAuth client secret.
95
98
"""
@@ -103,13 +106,14 @@ def decorator(function) -> _click_option_decorator_type:
103
106
default = default ,
104
107
show_envvar = True ,
105
108
show_default = True ,
109
+ hidden = hidden ,
106
110
)(function )
107
111
return function
108
112
109
113
return decorator
110
114
111
115
112
- def opt_extra (default = None ) -> _click_option_decorator_type :
116
+ def opt_extra (default = None , hidden = False ) -> _click_option_decorator_type :
113
117
"""
114
118
Click option for specifying extra options.
115
119
"""
@@ -128,13 +132,14 @@ def decorator(function) -> _click_option_decorator_type:
128
132
default = default ,
129
133
show_envvar = True ,
130
134
show_default = True ,
135
+ hidden = hidden ,
131
136
)(function )
132
137
return function
133
138
134
139
return decorator
135
140
136
141
137
- def opt_human_readable (default = False ) -> _click_option_decorator_type :
142
+ def opt_human_readable (default = False , hidden = False ) -> _click_option_decorator_type :
138
143
"""
139
144
Click option to toggle raw / human-readable formatting.
140
145
"""
@@ -146,13 +151,14 @@ def decorator(function) -> _click_option_decorator_type:
146
151
help = "Reformat fields to be human readable." ,
147
152
default = default ,
148
153
show_default = True ,
154
+ hidden = hidden ,
149
155
)(function )
150
156
return function
151
157
152
158
return decorator
153
159
154
160
155
- def opt_issuer (default = None , required = False ) -> _click_option_decorator_type :
161
+ def opt_issuer (default = None , hidden = False , required = False ) -> _click_option_decorator_type :
156
162
"""
157
163
Click option for specifying an OAuth token issuer for the
158
164
planet_auth package's click commands.
@@ -168,13 +174,14 @@ def decorator(function) -> _click_option_decorator_type:
168
174
show_envvar = False ,
169
175
show_default = False ,
170
176
required = required ,
177
+ hidden = hidden ,
171
178
)(function )
172
179
return function
173
180
174
181
return decorator
175
182
176
183
177
- def opt_loglevel (default = "INFO" ) -> _click_option_decorator_type :
184
+ def opt_loglevel (default = "INFO" , hidden = False ) -> _click_option_decorator_type :
178
185
"""
179
186
Click option for specifying a log level.
180
187
"""
@@ -189,13 +196,14 @@ def decorator(function) -> _click_option_decorator_type:
189
196
default = default ,
190
197
show_envvar = True ,
191
198
show_default = True ,
199
+ hidden = hidden ,
192
200
)(function )
193
201
return function
194
202
195
203
return decorator
196
204
197
205
198
- def opt_long (default = False ) -> _click_option_decorator_type :
206
+ def opt_long (default = False , hidden = False ) -> _click_option_decorator_type :
199
207
"""
200
208
Click option specifying that long or more detailed output should be produced.
201
209
"""
@@ -208,13 +216,14 @@ def decorator(function) -> _click_option_decorator_type:
208
216
is_flag = True ,
209
217
default = default ,
210
218
show_default = True ,
219
+ hidden = hidden ,
211
220
)(function )
212
221
return function
213
222
214
223
return decorator
215
224
216
225
217
- def opt_open_browser (default = True ) -> _click_option_decorator_type :
226
+ def opt_open_browser (default = True , hidden = False ) -> _click_option_decorator_type :
218
227
"""
219
228
Click option for specifying whether or not opening a browser is permitted
220
229
for the planet_auth package's click commands.
@@ -226,13 +235,14 @@ def decorator(function) -> _click_option_decorator_type:
226
235
help = "Allow/Suppress the automatic opening of a browser window." ,
227
236
default = default ,
228
237
show_default = True ,
238
+ hidden = hidden ,
229
239
)(function )
230
240
return function
231
241
232
242
return decorator
233
243
234
244
235
- def opt_organization (default = None ) -> _click_option_decorator_type :
245
+ def opt_organization (default = None , hidden = False ) -> _click_option_decorator_type :
236
246
"""
237
247
Click option for specifying an Organization.
238
248
"""
@@ -248,6 +258,7 @@ def decorator(function) -> _click_option_decorator_type:
248
258
default = default ,
249
259
show_envvar = True ,
250
260
show_default = True ,
261
+ hidden = hidden ,
251
262
)(function )
252
263
return function
253
264
@@ -281,7 +292,7 @@ def decorator(function) -> _click_option_decorator_type:
281
292
return decorator
282
293
283
294
284
- def opt_profile (default = None ) -> _click_option_decorator_type :
295
+ def opt_profile (default = None , hidden = False ) -> _click_option_decorator_type :
285
296
"""
286
297
Click option for specifying an auth profile for the
287
298
planet_auth package's click commands.
@@ -304,13 +315,14 @@ def decorator(function) -> _click_option_decorator_type:
304
315
show_envvar = True ,
305
316
show_default = True ,
306
317
is_eager = True ,
318
+ hidden = hidden ,
307
319
)(function )
308
320
return function
309
321
310
322
return decorator
311
323
312
324
313
- def opt_project (default = None ) -> _click_option_decorator_type :
325
+ def opt_project (default = None , hidden = False ) -> _click_option_decorator_type :
314
326
"""
315
327
Click option for specifying a project ID.
316
328
"""
@@ -326,13 +338,14 @@ def decorator(function) -> _click_option_decorator_type:
326
338
default = default ,
327
339
show_envvar = True ,
328
340
show_default = True ,
341
+ hidden = hidden ,
329
342
)(function )
330
343
return function
331
344
332
345
return decorator
333
346
334
347
335
- def opt_qr_code (default = False ) -> _click_option_decorator_type :
348
+ def opt_qr_code (default = False , hidden = False ) -> _click_option_decorator_type :
336
349
"""
337
350
Click option for specifying whether a QR code should be displayed.
338
351
"""
@@ -343,13 +356,14 @@ def decorator(function) -> _click_option_decorator_type:
343
356
help = "Control whether a QR code is displayed for the user." ,
344
357
default = default ,
345
358
show_default = True ,
359
+ hidden = hidden ,
346
360
)(function )
347
361
return function
348
362
349
363
return decorator
350
364
351
365
352
- def opt_refresh (default = True ) -> _click_option_decorator_type :
366
+ def opt_refresh (default = True , hidden = False ) -> _click_option_decorator_type :
353
367
"""
354
368
Click option specifying a refresh should be attempted if applicable.
355
369
"""
@@ -360,13 +374,14 @@ def decorator(function) -> _click_option_decorator_type:
360
374
help = "Automatically perform a credential refresh if required." ,
361
375
default = default ,
362
376
show_default = True ,
377
+ hidden = hidden ,
363
378
)(function )
364
379
return function
365
380
366
381
return decorator
367
382
368
383
369
- def opt_token (default = None ) -> _click_option_decorator_type :
384
+ def opt_token (default = None , hidden = False ) -> _click_option_decorator_type :
370
385
"""
371
386
Click option for specifying a token literal.
372
387
"""
@@ -380,13 +395,14 @@ def decorator(function) -> _click_option_decorator_type:
380
395
# envvar=EnvironmentVariables.AUTH_TOKEN,
381
396
show_envvar = False ,
382
397
show_default = False ,
398
+ hidden = hidden ,
383
399
)(function )
384
400
return function
385
401
386
402
return decorator
387
403
388
404
389
- def opt_scope (default = None ) -> _click_option_decorator_type :
405
+ def opt_scope (default = None , hidden = False ) -> _click_option_decorator_type :
390
406
"""
391
407
Click option for specifying an OAuth token scope for the
392
408
planet_auth package's click commands.
@@ -405,13 +421,14 @@ def decorator(function) -> _click_option_decorator_type:
405
421
default = default ,
406
422
show_envvar = True ,
407
423
show_default = True ,
424
+ hidden = hidden ,
408
425
)(function )
409
426
return function
410
427
411
428
return decorator
412
429
413
430
414
- def opt_sops (default = False ) -> _click_option_decorator_type :
431
+ def opt_sops (default = False , hidden = False ) -> _click_option_decorator_type :
415
432
"""
416
433
Click option specifying that SOPS should be used.
417
434
"""
@@ -423,13 +440,14 @@ def decorator(function) -> _click_option_decorator_type:
423
440
" The environment must be configured for SOPS to work by default." ,
424
441
default = default ,
425
442
show_default = True ,
443
+ hidden = hidden ,
426
444
)(function )
427
445
return function
428
446
429
447
return decorator
430
448
431
449
432
- def opt_token_file (default = None ) -> _click_option_decorator_type :
450
+ def opt_token_file (default = None , hidden = False ) -> _click_option_decorator_type :
433
451
"""
434
452
Click option for specifying a token file location for the
435
453
planet_auth package's click commands.
@@ -444,6 +462,7 @@ def decorator(function) -> _click_option_decorator_type:
444
462
default = default ,
445
463
show_envvar = False ,
446
464
show_default = True ,
465
+ hidden = hidden ,
447
466
)(function )
448
467
return function
449
468
@@ -473,7 +492,7 @@ def decorator(function) -> _click_option_decorator_type:
473
492
return decorator
474
493
475
494
476
- def opt_yes_no (default = None ) -> _click_option_decorator_type :
495
+ def opt_yes_no (default = None , hidden = False ) -> _click_option_decorator_type :
477
496
"""
478
497
Click option to bypass prompts with a yes or no selection.
479
498
"""
@@ -485,6 +504,7 @@ def decorator(function) -> _click_option_decorator_type:
485
504
help = 'Skip user prompts with a "yes" or "no" selection' ,
486
505
default = default ,
487
506
show_default = True ,
507
+ hidden = hidden ,
488
508
)(function )
489
509
return function
490
510
0 commit comments