]> git.mxchange.org Git - fba.git/blobdiff - fba/helpers/dicts.py
Continued:
[fba.git] / fba / helpers / dicts.py
index 3f8a7e680463ecd0ffb3e9f6b481dd4e50d93165..b3f2632386eb8526c7e385eef74fa482bc33cd17 100644 (file)
@@ -21,9 +21,9 @@ logger = logging.getLogger(__name__)
 def has_key(lists: list, key: str, value: any) -> bool:
     logger.debug("lists()=%d,key='%s',value[]='%s' - CALLED!", len(lists), key, type(value))
     if not isinstance(lists, list):
-        raise ValueError(f"Parameter lists[]='{type(lists)}' is not 'list'")
+        raise ValueError(f"Parameter lists[]='{type(lists)}' is not of type 'list'")
     elif not isinstance(key, str):
-        raise ValueError(f"Parameter key[]='{type(key)}' is not 'str'")
+        raise ValueError(f"Parameter key[]='{type(key)}' is not of type 'str'")
     elif key == "":
         raise ValueError("Parameter 'key' is empty")
 
@@ -32,7 +32,7 @@ def has_key(lists: list, key: str, value: any) -> bool:
     for row in lists:
         logger.debug("row[%s]='%s", type(row), row)
         if not isinstance(row, dict):
-            raise ValueError(f"row[]='{type(row)}' is not 'dict'")
+            raise ValueError(f"row[]='{type(row)}' is not of type 'dict'")
         elif not key in row:
             raise KeyError(f"Cannot find key='{key}'")
         elif row[key] == value: