From 75387b99ca013b9fc24ca033c3e72d831f4d5eea Mon Sep 17 00:00:00 2001 From: Alexander Alemayhu Date: Thu, 17 Oct 2024 04:50:23 +0200 Subject: [PATCH] fix: resolve linter issues --- helpers/write_apkg.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/helpers/write_apkg.py b/helpers/write_apkg.py index 23faf6d..c5be23b 100644 --- a/helpers/write_apkg.py +++ b/helpers/write_apkg.py @@ -66,12 +66,14 @@ def _write_new_apkg(deck_payloads, media_files): if e.errno == 36: # File name too long # Handle the error, e.g., shorten the filename or move to a different directory print("File name too long. Shortening filename.") - tmp_file.name = f'{truncated_name[:max_name_length - 10]}-truncated-{first_deck_id}.apkg' + tmp_file.name = ( + f'{truncated_name[:max_name_length - 10]}-truncated-{first_deck_id}.apkg' + ) package.write_to_file(tmp_file.name) else: raise e # Re-raise other exceptions - final_path = os.path.join(os.getcwd() , tmp_file.name) + final_path = os.path.join(os.getcwd(), tmp_file.name) os.rename(tmp_file.name, final_path) - sys.stdout.write(final_path) \ No newline at end of file + sys.stdout.write(final_path)