From ebf46c61c208d6d1800f85ff7d77431691f2f4cf Mon Sep 17 00:00:00 2001 From: wverastegui Date: Fri, 5 Jan 2024 14:20:10 +0100 Subject: [PATCH] Implemented has_retention_indices function --- RIAssigner/data/Data.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RIAssigner/data/Data.py b/RIAssigner/data/Data.py index 9a509e4..dfa8d82 100644 --- a/RIAssigner/data/Data.py +++ b/RIAssigner/data/Data.py @@ -61,6 +61,10 @@ def get_possible_ri_keys(cls) -> List[str]: List[str]: List of supported retention index keys. """ return cls._ri_possible_keys.copy() + + @classmethod + def has_retention_indices(dict_obj, _rt_possible_keys): + return any(key in dict_obj for key in _rt_possible_keys) def __init__(self, filename: str, filetype: str, rt_unit: str): self._filename = filename