Skip to content

Commit 235927c

Browse files
committed
relink: Reformat with black.
1 parent fad36df commit 235927c

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

relink.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,7 @@ def find_owned_files_scandir(item, user_uid, inputdata_root=DEFAULT_INPUTDATA_RO
162162
)
163163

164164
# Things other than directories are handled separately
165-
elif (
166-
entry_path := handle_non_dir(entry, user_uid)
167-
) is not None:
165+
elif (entry_path := handle_non_dir(entry, user_uid)) is not None:
168166
yield entry_path
169167

170168
except (OSError, PermissionError) as e:
@@ -219,13 +217,15 @@ def replace_files_with_symlinks(
219217
)
220218

221219
# Use efficient scandir-based search
222-
for file_path in find_owned_files_scandir(item_to_process, user_uid, inputdata_root):
223-
replace_one_file_with_symlink(inputdata_root, target_dir, file_path, dry_run=dry_run)
220+
for file_path in find_owned_files_scandir(
221+
item_to_process, user_uid, inputdata_root
222+
):
223+
replace_one_file_with_symlink(
224+
inputdata_root, target_dir, file_path, dry_run=dry_run
225+
)
224226

225227

226-
def replace_one_file_with_symlink(
227-
inputdata_root, target_dir, file_path, dry_run=False
228-
):
228+
def replace_one_file_with_symlink(inputdata_root, target_dir, file_path, dry_run=False):
229229
"""
230230
Given a file, replaces it with a symbolic link to the same relative path in a target directory
231231
tree.
@@ -400,7 +400,9 @@ def process_args(args):
400400
args.log_level = get_log_level(quiet=args.quiet, verbose=args.verbose)
401401

402402
# Ensure that items_to_process is a list
403-
if hasattr(args, "items_to_process") and not isinstance(args.items_to_process, list):
403+
if hasattr(args, "items_to_process") and not isinstance(
404+
args.items_to_process, list
405+
):
404406
args.items_to_process = [args.items_to_process]
405407

406408
# Check that everything is an absolute path (should have been converted, if needed, during

0 commit comments

Comments
 (0)