From 7edaab084315865f015b95a55b4e692bb51dd763 Mon Sep 17 00:00:00 2001 From: "HOME-2022\\User" Date: Sun, 2 Jun 2024 11:32:47 +0300 Subject: [PATCH] more warnings hunting small output fix - remove a dot in the output --- duplicate_files_in_folders/duplicates_finder.py | 3 ++- duplicate_files_in_folders/utils.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/duplicate_files_in_folders/duplicates_finder.py b/duplicate_files_in_folders/duplicates_finder.py index ed7e177..e28500e 100644 --- a/duplicate_files_in_folders/duplicates_finder.py +++ b/duplicate_files_in_folders/duplicates_finder.py @@ -104,7 +104,8 @@ def find_duplicates_files_v3(args, source: str, target: str) -> (Dict, List[Dict combined = process_potential_duplicates(potential_source_duplicates, combined, 'source', args) get_keys_function = get_files_keys_parallel \ if (len(hash_manager.get_hashes_by_folder(target)) > len(target_stats) / 2) else get_files_keys - combined = process_potential_duplicates(potential_target_duplicates, combined, 'target', args, get_keys_function) + combined = process_potential_duplicates(potential_target_duplicates, combined, 'target', args, + get_keys_function) # Filter out combined items that don't have both source and target - ie size = 2 combined = {k: v for k, v in combined.items() if len(v) == 2} diff --git a/duplicate_files_in_folders/utils.py b/duplicate_files_in_folders/utils.py index cdf02bc..ee3ddd9 100644 --- a/duplicate_files_in_folders/utils.py +++ b/duplicate_files_in_folders/utils.py @@ -84,7 +84,7 @@ def get_size_constraints_string(min_size=None, max_size=None): f"Maximum Size: {max_size:,} bytes" if max_size is not None else None ] size_constraints = [constraint for constraint in size_constraints if constraint] - return f"{', '.join(size_constraints)}." if size_constraints else "No Size Constraints." + return f"{', '.join(size_constraints)}." if size_constraints else "No Size Constraints" def confirm_script_execution(args): @@ -233,7 +233,7 @@ def output_results(args, files_moved, files_created, deleted_source_folders, dup summary_lines = { 'Source Files': f"{format_number_with_commas(len(source_stats)) if source_stats else 'N/A'} files", 'Target Files': f"{format_number_with_commas(len(target_stats)) if target_stats else 'N/A'} files", - 'Files Moved': f"{format_number_with_commas(files_moved)}", + 'Files Moved': f"{format_number_with_commas(files_moved)} files", 'Files Created': f"{format_number_with_commas(files_created)} copies", }