diff options
author | 2021-05-13 13:34:06 -0400 | |
---|---|---|
committer | 2021-05-13 13:34:06 -0400 | |
commit | 2aa1916d5c8e4832f26f6da4094238e9a0021d1c (patch) | |
tree | 2ce3195a019ef84fd0b2d6509f5deec7b25e19bc /bot/exts/easter/egghead_quiz.py | |
parent | fix: Resolve Merge Conflicts (diff) |
chore: Use pathlib.Path.read_text & write_text over open
Diffstat (limited to 'bot/exts/easter/egghead_quiz.py')
-rw-r--r-- | bot/exts/easter/egghead_quiz.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/bot/exts/easter/egghead_quiz.py b/bot/exts/easter/egghead_quiz.py index b6b1593d..4b67310f 100644 --- a/bot/exts/easter/egghead_quiz.py +++ b/bot/exts/easter/egghead_quiz.py @@ -1,7 +1,7 @@ import asyncio import logging import random -from json import load +from json import loads from pathlib import Path from typing import Union @@ -13,8 +13,7 @@ from bot.constants import Colours log = logging.getLogger(__name__) -with open(Path("bot/resources/easter/egghead_questions.json"), "r", encoding="utf8") as f: - EGGHEAD_QUESTIONS = load(f) +EGGHEAD_QUESTIONS = loads(Path("bot/resources/easter/egghead_questions.json").read_text("utf8")) EMOJIS = [ |