@@ -116,7 +116,7 @@ def add_from_filesystem(
116
116
log .info (
117
117
f"{ Fore .CYAN } i{ Style .RESET_ALL } No config specified and no default "
118
118
f"home config, will use/create "
119
- f"{ Fore .BLUE } { config_file_path } { Style .RESET_ALL } "
119
+ f"{ Fore .BLUE } { config_file_path } { Style .RESET_ALL } " ,
120
120
)
121
121
elif len (home_configs ) > 1 :
122
122
log .error (
@@ -148,7 +148,7 @@ def add_from_filesystem(
148
148
log .info (
149
149
f"{ Fore .CYAN } i{ Style .RESET_ALL } Config file "
150
150
f"{ Fore .BLUE } { config_file_path } { Style .RESET_ALL } "
151
- f"not found. A new one will be created."
151
+ f"not found. A new one will be created." ,
152
152
)
153
153
154
154
found_repos : list [
@@ -224,7 +224,7 @@ def add_from_filesystem(
224
224
if not found_repos :
225
225
log .info (
226
226
f"{ Fore .YELLOW } !{ Style .RESET_ALL } No git repositories found in "
227
- f"{ Fore .BLUE } { scan_dir } { Style .RESET_ALL } . Nothing to add."
227
+ f"{ Fore .BLUE } { scan_dir } { Style .RESET_ALL } . Nothing to add." ,
228
228
)
229
229
return
230
230
@@ -244,47 +244,47 @@ def add_from_filesystem(
244
244
log .info (
245
245
f"{ Fore .YELLOW } !{ Style .RESET_ALL } Found "
246
246
f"{ Fore .CYAN } { len (existing_repos )} { Style .RESET_ALL } "
247
- f"existing repositories already in configuration."
247
+ f"existing repositories already in configuration." ,
248
248
)
249
249
else :
250
250
# Show details only for small numbers
251
251
log .info (
252
252
f"{ Fore .YELLOW } !{ Style .RESET_ALL } Found "
253
253
f"{ Fore .CYAN } { len (existing_repos )} { Style .RESET_ALL } "
254
- f"existing repositories in configuration:"
254
+ f"existing repositories in configuration:" ,
255
255
)
256
256
for name , url , key in existing_repos :
257
257
log .info (
258
258
f" { Fore .BLUE } •{ Style .RESET_ALL } "
259
259
f"{ Fore .CYAN } { name } { Style .RESET_ALL } "
260
260
f"({ Fore .YELLOW } { url } { Style .RESET_ALL } ) at "
261
261
f"{ Fore .MAGENTA } { key } { name } { Style .RESET_ALL } "
262
- f"in { Fore .BLUE } { config_file_path } { Style .RESET_ALL } "
262
+ f"in { Fore .BLUE } { config_file_path } { Style .RESET_ALL } " ,
263
263
)
264
264
265
265
if not repos_to_add :
266
266
if existing_repos :
267
267
log .info (
268
268
f"{ Fore .GREEN } ✓{ Style .RESET_ALL } All found repositories already exist "
269
- f"in the configuration. { Fore .GREEN } Nothing to do.{ Style .RESET_ALL } "
269
+ f"in the configuration. { Fore .GREEN } Nothing to do.{ Style .RESET_ALL } " ,
270
270
)
271
271
return
272
272
273
273
# Show what will be added
274
274
log .info (
275
275
f"\n { Fore .GREEN } Found { len (repos_to_add )} new "
276
276
f"{ 'repository' if len (repos_to_add ) == 1 else 'repositories' } "
277
- f"to add:{ Style .RESET_ALL } "
277
+ f"to add:{ Style .RESET_ALL } " ,
278
278
)
279
279
for repo_name , repo_url , _determined_base_key in repos_to_add :
280
280
log .info (
281
281
f" { Fore .GREEN } +{ Style .RESET_ALL } { Fore .CYAN } { repo_name } { Style .RESET_ALL } "
282
- f"({ Fore .YELLOW } { repo_url } { Style .RESET_ALL } )"
282
+ f"({ Fore .YELLOW } { repo_url } { Style .RESET_ALL } )" ,
283
283
)
284
284
285
285
if not yes :
286
286
confirm = input (
287
- f"\n { Fore .CYAN } Add these repositories? [y/N]: { Style .RESET_ALL } "
287
+ f"\n { Fore .CYAN } Add these repositories? [y/N]: { Style .RESET_ALL } " ,
288
288
).lower ()
289
289
if confirm not in {"y" , "yes" }:
290
290
log .info (f"{ Fore .RED } ✗{ Style .RESET_ALL } Aborted by user." )
@@ -307,7 +307,7 @@ def add_from_filesystem(
307
307
f"{ Fore .GREEN } +{ Style .RESET_ALL } Adding "
308
308
f"{ Fore .CYAN } '{ repo_name } '{ Style .RESET_ALL } "
309
309
f"({ Fore .YELLOW } { repo_url } { Style .RESET_ALL } ) under "
310
- f"'{ Fore .MAGENTA } { determined_base_key } { Style .RESET_ALL } '."
310
+ f"'{ Fore .MAGENTA } { determined_base_key } { Style .RESET_ALL } '." ,
311
311
)
312
312
changes_made = True
313
313
@@ -316,7 +316,7 @@ def add_from_filesystem(
316
316
save_config_yaml (config_file_path , raw_config )
317
317
log .info (
318
318
f"{ Fore .GREEN } ✓{ Style .RESET_ALL } Successfully updated "
319
- f"{ Fore .BLUE } { config_file_path } { Style .RESET_ALL } ."
319
+ f"{ Fore .BLUE } { config_file_path } { Style .RESET_ALL } ." ,
320
320
)
321
321
except Exception :
322
322
log .exception (f"Error saving config to { config_file_path } " )
@@ -327,5 +327,5 @@ def add_from_filesystem(
327
327
raise
328
328
else :
329
329
log .info (
330
- f"{ Fore .GREEN } ✓{ Style .RESET_ALL } No changes made to the configuration."
330
+ f"{ Fore .GREEN } ✓{ Style .RESET_ALL } No changes made to the configuration." ,
331
331
)
0 commit comments