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/valentines/myvalenstate.py | |
parent | fix: Resolve Merge Conflicts (diff) |
chore: Use pathlib.Path.read_text & write_text over open
Diffstat (limited to 'bot/exts/valentines/myvalenstate.py')
-rw-r--r-- | bot/exts/valentines/myvalenstate.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/bot/exts/valentines/myvalenstate.py b/bot/exts/valentines/myvalenstate.py index 1c67984b..d2409dcc 100644 --- a/bot/exts/valentines/myvalenstate.py +++ b/bot/exts/valentines/myvalenstate.py @@ -12,8 +12,7 @@ from bot.constants import Colours log = logging.getLogger(__name__) -with open(Path("bot/resources/valentines/valenstates.json"), "r", encoding="utf8") as file: - STATES = json.load(file) +STATES = json.loads(Path("bot/resources/valentines/valenstates.json").read_text("utf8")) class MyValenstate(commands.Cog): |