@@ -35,7 +35,7 @@ def _opt_pdb_on_error():
35
35
"--pdb-on-error" ,
36
36
"pdb_on_error" ,
37
37
is_flag = True ,
38
- help = "Invoke PDB if there's an uncaught exception during the program execution" ,
38
+ help = "Invoke PDB if there's an uncaught exception during the program execution. " ,
39
39
callback = _set_own_excepthook ,
40
40
expose_value = True ,
41
41
is_eager = True ,
@@ -163,7 +163,7 @@ def _opt_tw_filter():
163
163
type = str ,
164
164
help = (
165
165
"Taskwarrior filter for specifying the tasks to synchronize. These filters will be"
166
- " concatenated using OR with potential tags and projects potentially specified"
166
+ " concatenated using OR with potential tags and projects potentially specified. "
167
167
),
168
168
)
169
169
@@ -174,7 +174,7 @@ def _opt_tw_all_tasks():
174
174
"--taskwarrior-all-tasks" ,
175
175
"tw_sync_all_tasks" ,
176
176
is_flag = True ,
177
- help = "Sync all taskwarrior tasks (potentially very slow)" ,
177
+ help = "Sync all taskwarrior tasks (potentially very slow). " ,
178
178
)
179
179
180
180
@@ -184,7 +184,7 @@ def _opt_tw_tags():
184
184
"--taskwarrior-tags" ,
185
185
"tw_tags" ,
186
186
type = str ,
187
- help = "Taskwarrior tags to synchronize" ,
187
+ help = "Taskwarrior tags to synchronize. " ,
188
188
expose_value = True ,
189
189
multiple = True ,
190
190
)
@@ -196,7 +196,7 @@ def _opt_tw_project():
196
196
"--tw-project" ,
197
197
"tw_project" ,
198
198
type = str ,
199
- help = "Taskwarrior project to synchronize" ,
199
+ help = "Taskwarrior project to synchronize. " ,
200
200
expose_value = True ,
201
201
is_eager = True ,
202
202
)
@@ -216,7 +216,7 @@ def callback(ctx, param, value):
216
216
type = str ,
217
217
help = (
218
218
"Only synchronize Taskwarrior tasks that have been modified in the last X days"
219
- " (specify X, e.g., 1, 30, 0.5, etc.)"
219
+ " (specify X, e.g., 1, 30, 0.5, etc.). "
220
220
),
221
221
callback = callback ,
222
222
)
@@ -229,7 +229,7 @@ def _opt_prefer_scheduled_date():
229
229
is_flag = True ,
230
230
help = (
231
231
'Prefer using the "scheduled" date field instead of the "due" date if the former'
232
- " is available"
232
+ " is available. "
233
233
),
234
234
)
235
235
@@ -241,7 +241,7 @@ def opt_notion_page_id():
241
241
"--notion-page" ,
242
242
"notion_page_id" ,
243
243
type = str ,
244
- help = "Page ID of the Notion page to synchronize" ,
244
+ help = "Page ID of the Notion page to synchronize. " ,
245
245
)
246
246
247
247
@@ -250,7 +250,7 @@ def opt_notion_token_pass_path():
250
250
"--token" ,
251
251
"--token-pass-path" ,
252
252
"token_pass_path" ,
253
- help = "Path in the UNIX password manager to fetch" ,
253
+ help = "Path in the UNIX password manager to fetch. " ,
254
254
)
255
255
256
256
@@ -279,7 +279,7 @@ def _opt_gkeep_user_pass_path():
279
279
"--user" ,
280
280
"--user-pass-path" ,
281
281
"gkeep_user_pass_path" ,
282
- help = "Path in the UNIX password manager to fetch the Google username from" ,
282
+ help = "Path in the UNIX password manager to fetch the Google username from. " ,
283
283
default = "gkeepapi/user" ,
284
284
)
285
285
@@ -289,7 +289,7 @@ def _opt_gkeep_passwd_pass_path():
289
289
"--passwd" ,
290
290
"--passwd-pass-path" ,
291
291
"gkeep_passwd_pass_path" ,
292
- help = "Path in the UNIX password manager to fetch the Google password from" ,
292
+ help = "Path in the UNIX password manager to fetch the Google password from. " ,
293
293
default = "gkeepapi/passwd" ,
294
294
)
295
295
@@ -299,7 +299,7 @@ def _opt_gkeep_token_pass_path():
299
299
"--token" ,
300
300
"--token-pass-path" ,
301
301
"gkeep_token_pass_path" ,
302
- help = "Path in the UNIX password manager to fetch the google keep token from" ,
302
+ help = "Path in the UNIX password manager to fetch the google keep token from. " ,
303
303
default = "gkeepapi/token" ,
304
304
)
305
305
@@ -310,7 +310,7 @@ def _opt_gkeep_labels():
310
310
"--gkeep-labels" ,
311
311
type = str ,
312
312
multiple = True ,
313
- help = "Google Keep labels whose notes to synchronize" ,
313
+ help = "Google Keep labels whose notes to synchronize. " ,
314
314
)
315
315
316
316
@@ -320,7 +320,7 @@ def _opt_gkeep_ignore_labels():
320
320
"--gkeep-ignore-labels" ,
321
321
type = str ,
322
322
multiple = True ,
323
- help = "Google Keep labels whose notes will be explicitly ignored" ,
323
+ help = "Google Keep labels whose notes will be explicitly ignored. " ,
324
324
)
325
325
326
326
@@ -331,7 +331,7 @@ def _opt_gkeep_note():
331
331
type = str ,
332
332
help = (
333
333
"Full title of the Google Keep Note to synchronize - Make sure you enable the"
334
- " checkboxes"
334
+ " checkboxes. "
335
335
),
336
336
)
337
337
@@ -342,7 +342,7 @@ def opt_gcal_calendar():
342
342
"-c" ,
343
343
"--gcal-calendar" ,
344
344
type = str ,
345
- help = "Name of the Google Calendar to synchronize (will be created if not there)" ,
345
+ help = "Name of the Google Calendar to synchronize (will be created if not there). " ,
346
346
)
347
347
348
348
@@ -352,7 +352,7 @@ def opt_gtasks_list():
352
352
"-l" ,
353
353
"--gtasks-list" ,
354
354
type = str ,
355
- help = "Name of the Google Tasks list to synchronize (will be created if not there)" ,
355
+ help = "Name of the Google Tasks list to synchronize (will be created if not there). " ,
356
356
)
357
357
358
358
@@ -362,7 +362,7 @@ def opt_google_secret_override():
362
362
"--google-secret" ,
363
363
default = None ,
364
364
type = click .Path (exists = True , file_okay = True , dir_okay = False , resolve_path = True ),
365
- help = "Override the client secret used for the communication with the Google APIs" ,
365
+ help = "Override the client secret used for the communication with the Google APIs. " ,
366
366
)
367
367
368
368
@@ -371,7 +371,7 @@ def opt_google_oauth_port():
371
371
"--oauth-port" ,
372
372
default = 8081 ,
373
373
type = int ,
374
- help = "Port to use for OAuth Authentication with Google Applications" ,
374
+ help = "Port to use for OAuth Authentication with Google Applications. " ,
375
375
)
376
376
377
377
@@ -399,15 +399,15 @@ def _opt_caldav_calendar():
399
399
"--caldav-calendar" ,
400
400
type = str ,
401
401
default = "Personal" ,
402
- help = "Name of the caldav Calendar to sync (will be created if not there)" ,
402
+ help = "Name of the caldav Calendar to sync (will be created if not there). " ,
403
403
)
404
404
405
405
406
406
def _opt_caldav_url ():
407
407
return click .option (
408
408
"--caldav-url" ,
409
409
type = str ,
410
- help = "URL where the caldav calendar is hosted at (including /dav if applicable)" ,
410
+ help = "URL where the caldav calendar is hosted at (including /dav if applicable). " ,
411
411
)
412
412
413
413
@@ -424,15 +424,15 @@ def _opt_caldav_passwd_pass_path():
424
424
"--caldav-passwd" ,
425
425
"--caldav-passwd-pass-path" ,
426
426
"caldav_passwd_pass_path" ,
427
- help = "Path in the UNIX password manager to fetch the caldav password from" ,
427
+ help = "Path in the UNIX password manager to fetch the caldav password from. " ,
428
428
)
429
429
430
430
431
431
def _opt_caldav_passwd_cmd ():
432
432
return click .option (
433
433
"--caldav-passwd-cmd" ,
434
434
"caldav_passwd_cmd" ,
435
- help = "Command that outputs the caldav password on stdout" ,
435
+ help = "Command that outputs the caldav password on stdout. " ,
436
436
)
437
437
438
438
@@ -444,7 +444,7 @@ def opt_filesystem_root():
444
444
"filesystem_root" ,
445
445
required = False ,
446
446
type = str ,
447
- help = "Directory to consider as root for synchronization operations" ,
447
+ help = "Directory to consider as root for synchronization operations. " ,
448
448
)
449
449
450
450
@@ -454,7 +454,7 @@ def opt_filename_extension():
454
454
"--filename-extension" ,
455
455
"filename_extension" ,
456
456
type = str ,
457
- help = "Use this extension for locally created files" ,
457
+ help = "Use this extension for locally created files. " ,
458
458
default = ".md" ,
459
459
)
460
460
@@ -492,15 +492,12 @@ def opt_default_duration_event_mins():
492
492
"default_event_duration_mins" ,
493
493
default = 30 ,
494
494
type = int ,
495
- help = "The default duration of an event that is to be created [in minutes]" ,
495
+ help = "The default duration of an event that is to be created [in minutes]. " ,
496
496
)
497
497
498
498
499
499
def _list_named_combinations (config_fname : str ) -> None :
500
- """List the named configurations currently available for the given configuration name.
501
-
502
- Mainly used by the top-level synchronization apps.
503
- """
500
+ """List the named configurations currently available for the given configuration name."""
504
501
logger .success (
505
502
format_list (
506
503
header = "\n \n Named configurations currently available" ,
@@ -511,19 +508,20 @@ def _list_named_combinations(config_fname: str) -> None:
511
508
512
509
def _opt_list_combinations (side_A_name : str , side_B_name : str ):
513
510
def callback (ctx , param , value ):
514
- _list_named_combinations (
515
- config_fname = determine_app_config_fname (
516
- side_A_name = side_A_name , side_B_name = side_B_name
511
+ if value is True :
512
+ _list_named_combinations (
513
+ config_fname = determine_app_config_fname (
514
+ side_A_name = side_A_name , side_B_name = side_B_name
515
+ )
517
516
)
518
- )
519
- sys .exit (0 )
517
+ sys .exit (0 )
520
518
521
519
return click .option (
522
520
"--list-combinations" ,
523
521
"do_list_combinations" ,
524
522
is_flag = True ,
525
523
expose_value = False ,
526
- help = f"List the available named { side_A_name } <->{ side_B_name } combinations" ,
524
+ help = f"List the available named { side_A_name } <->{ side_B_name } combinations. " ,
527
525
callback = callback ,
528
526
)
529
527
@@ -534,25 +532,25 @@ def _opt_resolution_strategy():
534
532
"--resolution-strategy" ,
535
533
default = "AlwaysSecondRS" ,
536
534
type = click .Choice (list (name_to_resolution_strategy_type .keys ())),
537
- help = "Resolution strategy to use during conflicts" ,
535
+ help = "Resolution strategy to use during conflicts. " ,
538
536
)
539
537
540
538
541
- def _list_resolution_strategies (ctx , param , value ):
542
- if value is not True :
543
- return
544
-
545
- strs = name_to_resolution_strategy_type .keys ()
546
- click .echo ("\n " .join ([f"{ a } . { b } " for a , b in zip (range (1 , len (strs ) + 1 ), strs )]))
547
- sys .exit (0 )
539
+ def _opt_list_resolution_strategies ():
540
+ def _list_resolution_strategies (ctx , param , value ):
541
+ if value is not True :
542
+ return
548
543
544
+ strs = name_to_resolution_strategy_type .keys ()
545
+ click .echo ("\n " .join ([f"{ a } . { b } " for a , b in zip (range (1 , len (strs ) + 1 ), strs )]))
546
+ sys .exit (0 )
549
547
550
- def _opt_list_resolution_strategies ():
551
548
return click .option (
552
549
"--list-resolution-strategies" ,
553
550
callback = _list_resolution_strategies ,
554
551
is_flag = True ,
555
- help = "List all the available resolution strategies and exit" ,
552
+ expose_value = False ,
553
+ help = "List all the available resolution strategies and exit." ,
556
554
)
557
555
558
556
@@ -562,7 +560,7 @@ def _opt_combination(side_A_name: str, side_B_name: str):
562
560
COMBINATION_FLAGS [1 ],
563
561
"combination_name" ,
564
562
type = str ,
565
- help = f"Name of an already saved { side_A_name } <->{ side_B_name } combination" ,
563
+ help = f"Name of an already saved { side_A_name } <->{ side_B_name } combination. " ,
566
564
)
567
565
568
566
0 commit comments