diff --git a/.markdownlint.json b/.markdownlint.json index 0aa04c0..7ab1720 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -1,3 +1,3 @@ { "MD026": false -} \ No newline at end of file +} diff --git a/.vscode/settings.json b/.vscode/settings.json index d3db2d2..060ee41 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,11 +1,5 @@ { - "python.testing.unittestArgs": [ - "-v", - "-s", - ".", - "-p", - "test_*.py" - ], + "python.testing.unittestArgs": ["-v", "-s", ".", "-p", "test_*.py"], "python.testing.pytestEnabled": false, - "python.testing.unittestEnabled": true, -} \ No newline at end of file + "python.testing.unittestEnabled": true +} diff --git a/effortless/effortless.py b/effortless/effortless.py index 7caae83..c955e46 100644 --- a/effortless/effortless.py +++ b/effortless/effortless.py @@ -2,16 +2,18 @@ import json import os -_STORAGE_FILE = 'db.effortless' +_STORAGE_FILE = "db.effortless" + def set(obj): """Store an object in a persistent file-based storage.""" - with open(_STORAGE_FILE, 'w') as f: + with open(_STORAGE_FILE, "w") as f: json.dump(obj, f) + def get(): """Retrieve the stored object from file-based storage.""" if not os.path.exists(_STORAGE_FILE): return None - with open(_STORAGE_FILE, 'r') as f: + with open(_STORAGE_FILE, "r") as f: return json.load(f)