Skip to content

Commit

Permalink
Restore some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
promans718 committed Oct 4, 2024
1 parent e6953e4 commit 833d7c7
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions toolium/utils/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
import string
import uuid



from ast import literal_eval
from copy import deepcopy
from inspect import isfunction
Expand Down Expand Up @@ -648,12 +646,7 @@ def get_value_from_context(param, context):
value = value[part]
# evaluate if in an array, access is requested by index
elif isinstance(value, list) and part.lstrip('-+').isdigit() and int(part) < len(value):
try:
value = value[int(part)] if part.lstrip('-+').isdigit() else value[part]
except (TypeError, KeyError):
value = getattr(value, part)
except AttributeError as exc:
raise AttributeError(context.logger.info) from exc
value = value[int(part)]
# or by a key=value expression
elif isinstance(value, list) and (element := _select_element_in_list(value, part)):
value = element
Expand Down

0 comments on commit 833d7c7

Please sign in to comment.