Skip to content

Commit

Permalink
convert lists to tuples
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgromero committed Nov 21, 2024
1 parent 4356c63 commit 85adf28
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion botocore/regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ def _resolve_param_as_operation_context_param(
operation_ctx_params = operation_model.operation_context_parameters
if param_name in operation_ctx_params:
path = operation_ctx_params[param_name]['path']
return tuple(jmespath.search(path, call_args))
return jmespath.search(path, call_args)

def _resolve_param_as_builtin(self, builtin_name, builtins):
if builtin_name not in EndpointResolverBuiltins.__members__.values():
Expand Down
3 changes: 3 additions & 0 deletions botocore/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1491,6 +1491,9 @@ def func_with_weakref(weakref_to_self, *args, **kwargs):

@functools.wraps(func)
def inner(self, *args, **kwargs):
for kwarg_key, kwarg_value in kwargs.items():
if isinstance(kwarg_value, list):
kwargs[kwarg_key] = tuple(kwarg_value)
return func_with_weakref(weakref.ref(self), *args, **kwargs)

inner.cache_info = func_with_weakref.cache_info
Expand Down
3 changes: 0 additions & 3 deletions tests/unit/test_endpoint_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,6 @@ def ruleset_testcases():

for test in tests["testCases"]:
input_params = test["params"]
for key, value in input_params.items():
if isinstance(value, list):
input_params[key] = tuple(value)
expected_object = test["expect"]
if "error" in expected_object:
error_cases.append(
Expand Down

0 comments on commit 85adf28

Please sign in to comment.