Revert "fix(aurora): trying ast"
Some checks failed
Actions / Build Documentation (MkDocs) (pull_request) Successful in 28s
Actions / Lint Code (Ruff & Pylint) (pull_request) Failing after 40s

This reverts commit 278bd98349.
This commit is contained in:
Seaswimmer 2024-05-04 23:02:57 -04:00
parent 278bd98349
commit 4c8cd7bd16
Signed by: cswimr
GPG key ID: 5D671B5D03D65A7F

View file

@ -1,6 +1,5 @@
# pylint: disable=cyclic-import
import json
from ast import literal_eval
from datetime import datetime, timedelta
from typing import Optional, Union
@ -138,7 +137,7 @@ def generate_dict(bot: Red, result: dict, guild_id: int) -> dict:
if result[14] is not None:
json_str = result[14].replace('\\"', '"').replace('["{', '[{').replace('}"]', '}]')
logger.debug('%s\n%s', result[14], json_str)
changes = literal_eval(json_str)
changes = json.loads(json_str)
change_obj_list = []
for change in changes:
change_obj_list.append(Change.from_dict(bot=bot, data=change))