aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/evergreen/snakes/_converter.py
diff options
context:
space:
mode:
Diffstat (limited to 'bot/exts/evergreen/snakes/_converter.py')
-rw-r--r--bot/exts/evergreen/snakes/_converter.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/bot/exts/evergreen/snakes/_converter.py b/bot/exts/evergreen/snakes/_converter.py
index 0ca10d6c..26bde611 100644
--- a/bot/exts/evergreen/snakes/_converter.py
+++ b/bot/exts/evergreen/snakes/_converter.py
@@ -63,13 +63,10 @@ class Snake(Converter):
"""Build list of snakes from the static snake resources."""
# Get all the snakes
if cls.snakes is None:
- with (SNAKE_RESOURCES / "snake_names.json").open(encoding="utf8") as snakefile:
- cls.snakes = json.load(snakefile)
-
+ cls.snakes = json.loads((SNAKE_RESOURCES / "snake_names.json").read_text("utf8"))
# Get the special cases
if cls.special_cases is None:
- with (SNAKE_RESOURCES / "special_snakes.json").open(encoding="utf8") as snakefile:
- special_cases = json.load(snakefile)
+ special_cases = json.loads((SNAKE_RESOURCES / "special_snakes.json").read_text("utf8"))
cls.special_cases = {snake["name"].lower(): snake for snake in special_cases}
@classmethod