Skip to content

Commit

Permalink
clean up with pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgromero committed Nov 14, 2024
1 parent 780b529 commit ce7511a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 9 additions & 7 deletions botocore/regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
import copy
import logging
import re
import jmespath

from enum import Enum

import jmespath

from botocore import UNSIGNED, xform_name
from botocore.auth import AUTH_TYPE_MAPS, HAS_CRT
from botocore.crt import CRT_SUPPORTED_AUTH_TYPES
Expand Down Expand Up @@ -580,8 +580,10 @@ def _resolve_param_from_context(
)
if dynamic is not None:
return dynamic
operation_context_params = self._resolve_param_as_operation_context_param(
param_name, operation_model, call_args
operation_context_params = (
self._resolve_param_as_operation_context_param(
param_name, operation_model, call_args
)
)
if operation_context_params is not None:
return operation_context_params
Expand All @@ -607,11 +609,11 @@ def _resolve_param_as_client_context_param(self, param_name):
client_ctx_varname = client_ctx_params[param_name]
return self._client_context.get(client_ctx_varname)

def _resolve_param_as_operation_context_param(self, param_name, operation_model,
call_args):
def _resolve_param_as_operation_context_param(
self, param_name, operation_model, call_args
):
operation_ctx_params = operation_model.operation_context_parameters
if param_name in operation_ctx_params:
#TODO confirm this will always exist
path = operation_ctx_params[param_name]['path']
return tuple(jmespath.search(path, call_args))

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_endpoint_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def ruleset_testcases():
for test in tests["testCases"]:
input_params = test["params"]
for key, value in input_params.items():
if type(value) == list:
if isinstance(value, list):
input_params[key] = tuple(value)
expected_object = test["expect"]
if "error" in expected_object:
Expand Down

0 comments on commit ce7511a

Please sign in to comment.