v0.12.3: settings loader error message improvement

This commit is contained in:
Clemens Schwaighofer
2025-07-14 16:50:36 +09:00
parent 0770ac0bb4
commit 447034046e
2 changed files with 22 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
# MARK: Project info
[project]
name = "corelibs"
version = "0.12.2"
version = "0.12.3"
description = "Collection of utils for Python scripts"
readme = "README.md"
requires-python = ">=3.13"

View File

@@ -3,6 +3,9 @@ Dict helpers
"""
from typing import Any
def mask(
data_set: dict[str, str],
mask_keys: list[str] | None = None,
@@ -34,4 +37,22 @@ def mask(
for key, value in data_set.items()
}
def set_entry(dict_set: dict[str, Any], key: str, value_set: Any) -> dict[str, Any]:
"""
set a new entry in the dict set
Arguments:
key {str} -- _description_
dict_set {dict[str, Any]} -- _description_
value_set {Any} -- _description_
Returns:
dict[str, Any] -- _description_
"""
if not dict_set.get(key):
dict_set[key] = {}
dict_set[key] = value_set
return dict_set
# __END__