Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/__init__.py
diff options
context:
space:
mode:
authorHimadri Bhattacharjee <107522312+lavafroth@users.noreply.github.com>2023-06-22 12:09:14 +0000
committerGitHub <noreply@github.com>2023-06-22 14:09:14 +0200
commit72661dbf9bfbd12e42425066f9d5ce7c887f40c7 (patch)
treec0061e3abe08dfdcb489effd5218276221ecbbf0 /archinstall/__init__.py
parent23f98082cc5bb2703f4c31d5c42c299af18598ea (diff)
Simplify object serialization before JSON encoding (#1871)
* fix: check for helper functions for unsafe encode before falling back to safe encoding * feat: merge _encode and _unsafe_encode into simple serialization function to avoid immediate json.loads after json.dumps * fix: use function instead of a serializing class without trying to serialize keys that are unhashable or unsupported * feat: lazily evaluate serialized value based on key validity * feat: use dictionary comprehension and predefined compatible types * fix: handle enum types immediately after dicts * fix: return stringified object as a default * doc: update function docstring for serialize_to_dict * fix: rename serialize_to_dict to jsonify as it serializes to other primitive types as well
Diffstat (limited to 'archinstall/__init__.py')
-rw-r--r--archinstall/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/archinstall/__init__.py b/archinstall/__init__.py
index ddf81824..e5ec462a 100644
--- a/archinstall/__init__.py
+++ b/archinstall/__init__.py
@@ -30,7 +30,7 @@ from .lib.configuration import ConfigurationOutput
from .lib.general import (
generate_password, locate_binary, clear_vt100_escape_codes,
- JsonEncoder, JSON, UNSAFE_JSON, SysCommandWorker, SysCommand,
+ JSON, UNSAFE_JSON, SysCommandWorker, SysCommand,
run_custom_user_commands, json_stream_to_structure, secret
)