Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
legnadev committed Jun 27, 2024
1 parent 87eefd3 commit 0d7db1d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions toolium/utils/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -828,12 +828,13 @@ def store_by_storage_type(context, key, value):
:param context: behave context
:return:
"""
clean_key = re.sub(r'[\[\]]','', key)
clean_key = re.sub(r'[\[\]]', '', key)
if ":" in clean_key:
context_type = clean_key.split(":")[0]
context_key = clean_key.split(":")[1]
acccepted_context_types = ["FEATURE", "RUN"]
assert context_type in acccepted_context_types, f"Invalid key: {context_key}. Accepted keys: {acccepted_context_types}"
assert context_type in acccepted_context_types, (f"Invalid key: {context_key}. "
f"Accepted keys: {acccepted_context_types}")

if context_type == "FEATURE":
context.feature_storage[context_key] = value
Expand Down

0 comments on commit 0d7db1d

Please sign in to comment.