Skip to content

Commit f6ef8c1

Browse files
committed
remove redundant operation
1 parent 8898e8a commit f6ef8c1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

words_extractor_py/words.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ def worker(path: str, outdir: str, sorting: bool = False) -> Tuple[str, int]:
2727
filepath = path.replace(".yml", ".txt")
2828
filesize = os.path.getsize(filepath)
2929
with open(filepath) as file:
30-
3130
text = file.read().lower().rstrip()
3231
words = set(re.split(separator, text))
3332
with open(path) as file:
@@ -67,7 +66,7 @@ def worker(path: str, outdir: str, sorting: bool = False) -> Tuple[str, int]:
6766
path, size = res.get()
6867
total_size += size
6968
print(f"[{i+1}/{items_count}] {path}")
70-
print(f"Total files: {len(results)}")
69+
print(f"Total files: {items_count}")
7170
print(f"Total size: {round((total_size / 1024 / 1024))} MB")
7271
t = time.time() - t
7372
print(f"Total time: {t:.4f} s")

0 commit comments

Comments
 (0)