aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/halloween/spookynamerate.py
diff options
context:
space:
mode:
authorGravatar ToxicKidz <[email protected]>2021-05-13 13:34:06 -0400
committerGravatar ToxicKidz <[email protected]>2021-05-13 13:34:06 -0400
commit2aa1916d5c8e4832f26f6da4094238e9a0021d1c (patch)
tree2ce3195a019ef84fd0b2d6509f5deec7b25e19bc /bot/exts/halloween/spookynamerate.py
parentfix: Resolve Merge Conflicts (diff)
chore: Use pathlib.Path.read_text & write_text over open
Diffstat (limited to 'bot/exts/halloween/spookynamerate.py')
-rw-r--r--bot/exts/halloween/spookynamerate.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/bot/exts/halloween/spookynamerate.py b/bot/exts/halloween/spookynamerate.py
index 87172922..63040289 100644
--- a/bot/exts/halloween/spookynamerate.py
+++ b/bot/exts/halloween/spookynamerate.py
@@ -371,8 +371,7 @@ class SpookyNameRate(Cog):
@staticmethod
def load_json(file: Path) -> Dict[str, str]:
"""Loads a JSON file and returns its contents."""
- with file.open("r", encoding="utf-8") as f:
- return json.load(f)
+ return json.loads(file.read_text("utf8"))
@staticmethod
def in_allowed_month() -> bool: