Skip to content

Commit

Permalink
more warnings hunting
Browse files Browse the repository at this point in the history
small output fix - remove a dot in the output
  • Loading branch information
niradar committed Jun 2, 2024
1 parent 192adb1 commit 7edaab0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion duplicate_files_in_folders/duplicates_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
4 changes: 2 additions & 2 deletions duplicate_files_in_folders/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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",
}

Expand Down

0 comments on commit 7edaab0

Please sign in to comment.