From 23796197f7bdd17473bfd550814c22197a8f26c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Casaj=C3=BAs?= Date: Wed, 15 Jan 2025 18:33:59 +0100 Subject: [PATCH] Imports in order --- scripts/regen-words.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/regen-words.py b/scripts/regen-words.py index 54c9ed149..0b728a8b6 100755 --- a/scripts/regen-words.py +++ b/scripts/regen-words.py @@ -3,12 +3,12 @@ import sys import json -from app import config -from app.log import LOG - rootDir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.append(rootDir) +from app import config # noqa: E402 +from app.log import LOG # noqa: E402 + LOG.i(f"Reading {config.WORDS_FILE_PATH} file") words = [ word.strip() @@ -23,11 +23,13 @@ with open(destFile, "wb") as fd: fd.write( f"""# -#This file is auto-generated. Please run {sys.argv[0]} to re-generate it +# This file is auto-generated. Please run {sys.argv[0]} to re-generate it # import json -safe_words = json.loads('{serialized_words}') +safe_words = json.loads( + '{serialized_words}' +) """.encode("utf-8") )