From bff86898e983dbe08dfe923962c244feb1f10dbb Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Wed, 7 Aug 2024 16:41:33 +0200 Subject: [PATCH] moved json_load to bufjson.py --- dap/utils/bufjson.py | 9 +++++++-- dap/utils/utils.py | 7 ------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/dap/utils/bufjson.py b/dap/utils/bufjson.py index 2b243cd..342e5be 100644 --- a/dap/utils/bufjson.py +++ b/dap/utils/bufjson.py @@ -1,8 +1,7 @@ +import json import os from time import sleep -from .utils import json_load - class BufferedJSON: @@ -33,3 +32,9 @@ class BufferedJSON: +def json_load(filename, *args, **kwargs): + with open(filename, "r") as f: + return json.load(f, *args, **kwargs) + + + diff --git a/dap/utils/utils.py b/dap/utils/utils.py index 0e687ca..070d9ef 100644 --- a/dap/utils/utils.py +++ b/dap/utils/utils.py @@ -1,10 +1,3 @@ -import json - - -def json_load(filename, *args, **kwargs): - with open(filename, "r") as f: - return json.load(f, *args, **kwargs) - def read_bit(bits, n): """