From f49755689a5ae147820b8260a12de3ed5143fcf6 Mon Sep 17 00:00:00 2001 From: litagin02 Date: Mon, 19 Feb 2024 15:21:17 +0900 Subject: [PATCH] Fix counting lines --- preprocess_text.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/preprocess_text.py b/preprocess_text.py index 4f49100..75e61dc 100644 --- a/preprocess_text.py +++ b/preprocess_text.py @@ -16,8 +16,8 @@ preprocess_text_config = config.preprocess_text_config # Count lines for tqdm -def count_lines(file_path): - with file_path.open("r", encoding="utf-8") as file: +def count_lines(file_path: str): + with open(file_path, "r", encoding="utf-8") as file: return sum(1 for _ in file)