Skip to content

Commit

Permalink
Imports in order
Browse files Browse the repository at this point in the history
  • Loading branch information
acasajus committed Jan 15, 2025
1 parent 3ce7317 commit 2379619
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions scripts/regen-words.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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")
)

0 comments on commit 2379619

Please sign in to comment.