Skip to content

Commit

Permalink
small tdqm improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
niradar committed Jun 7, 2024
1 parent 8f2fec2 commit df78b95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion duplicate_files_in_folders/duplicates_finder.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import os
import concurrent.futures

import tqdm
from probables import BloomFilter
from duplicate_files_in_folders.hash_manager import HashManager
from duplicate_files_in_folders.file_manager import FileManager
Expand Down Expand Up @@ -163,7 +165,7 @@ def process_duplicates(combined: Dict, args: Namespace) -> (int, int):
files_created = files_moved = 0

# Process each file key in the combined dictionary - it contains the scan and ref locations of the duplicates
for file_key, locations in combined.items():
for file_key, locations in tqdm.tqdm(combined.items(), desc='Processing duplicates'):
scan_files = locations.get('scan', [])
ref_files = locations.get('ref', [])

Expand Down
2 changes: 1 addition & 1 deletion duplicate_files_in_folders/file_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def get_files_and_stats(directory: str | Path, raise_on_permission_error: bool =
return files_stats

def delete_empty_folders_in_tree(self, base_path: str, show_progress: bool = False,
progress_desc: str = "Deleting empty folders") -> int:
progress_desc: str = "Looking for empty folders") -> int:
"""
Delete empty folders in a directory tree
:param base_path: path to the directory
Expand Down

0 comments on commit df78b95

Please sign in to comment.