diff --git a/monkey/common/agent_configuration/utils.py b/monkey/common/agent_configuration/utils.py deleted file mode 100644 index 3470e57a1..000000000 --- a/monkey/common/agent_configuration/utils.py +++ /dev/null @@ -1,13 +0,0 @@ -from functools import wraps -from typing import Callable - -from common.utils.code_utils import freeze_lists_in_mapping - - -def freeze_lists(function: Callable): - @wraps(function) - def wrapper(self, data, **kwargs): - data = freeze_lists_in_mapping(data) - return function(self, data, **kwargs) - - return wrapper diff --git a/monkey/common/utils/code_utils.py b/monkey/common/utils/code_utils.py index 52fdcbaac..21c0ce175 100644 --- a/monkey/common/utils/code_utils.py +++ b/monkey/common/utils/code_utils.py @@ -1,5 +1,4 @@ import queue -from collections.abc import MutableSequence from typing import Any, List, MutableMapping, TypeVar T = TypeVar("T") @@ -49,10 +48,3 @@ def del_key(mapping: MutableMapping[T, Any], key: T): del mapping[key] except KeyError: pass - - -def freeze_lists_in_mapping(mapping: MutableMapping[str, Any]) -> MutableMapping[str, Any]: - for key, value in mapping.items(): - if isinstance(value, MutableSequence): - mapping[key] = tuple(value) - return mapping