isort implemented

This commit is contained in:
Merwane Hamadi
2023-04-17 13:41:42 -07:00
parent 9577468f0c
commit cf9a94a8b6
45 changed files with 236 additions and 187 deletions

View File

@@ -1,5 +1,7 @@
import json
from jsonschema import Draft7Validator
from autogpt.config import Config
from autogpt.logs import logger
@@ -19,7 +21,9 @@ def validate_json(json_object: object, schema_name: object) -> object:
if errors := sorted(validator.iter_errors(json_object), key=lambda e: e.path):
logger.error("The JSON object is invalid.")
if CFG.debug_mode:
logger.error(json.dumps(json_object, indent=4)) # Replace 'json_object' with the variable containing the JSON data
logger.error(
json.dumps(json_object, indent=4)
) # Replace 'json_object' with the variable containing the JSON data
logger.error("The following issues were found:")
for error in errors: