From 90ff91752aeb8ed19d397e66d6ad17c05e78cc07 Mon Sep 17 00:00:00 2001 From: Ben Coleman Date: Thu, 20 Jun 2024 12:47:28 -0400 Subject: [PATCH] fix liniting errors --- mirrulations-extractor/src/mirrextractor/extractor.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/mirrulations-extractor/src/mirrextractor/extractor.py b/mirrulations-extractor/src/mirrextractor/extractor.py index 6b9347d4..a2472409 100644 --- a/mirrulations-extractor/src/mirrextractor/extractor.py +++ b/mirrulations-extractor/src/mirrextractor/extractor.py @@ -122,11 +122,12 @@ def update_stats(): .make_attachment_save_path(complete_path) if not os.path.isfile(output_path): # Write an empty file. The extract_text method sometimes - # fails with an out-of-memory error if the file is too large, - # and a restart would try again. This ensures that the - # extraction is not attempted again when the extractor - # process is restarted (by Docker). - with open(output_path, 'w') as f: pass + # fails with an out-of-memory error if the file is too + # large, and a restart would try again. This ensures + # that the extraction is not attempted again when the + # extractor process is restarted (by Docker). + with open(output_path, 'w') as f: + pass start_time = time.time() Extractor.extract_text(complete_path, output_path) print(f"Time taken to extract text from {complete_path}"