Skip to content

Commit

Permalink
rename-method
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-harvey-z3q committed Jun 29, 2024
1 parent bcbaa23 commit 4f0c7ac
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sceptre/stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ def __init__(
)

self.s3_details = s3_details
self.parameters = self._ensure_parameters(parameters or {})
self.parameters = self._cast_parameters(parameters or {})
self.sceptre_user_data = sceptre_user_data or {}
self.notifications = notifications or []

Expand All @@ -276,10 +276,10 @@ def _ensure_boolean(self, config_name: str, value: Any) -> bool:
)
return value

def _ensure_parameters(
def _cast_parameters(
self, parameters: Dict[str, Any]
) -> Dict[str, Union[str, List[Union[str, Resolver]], Resolver]]:
"""Ensure CloudFormation parameters are of valid types"""
"""Cast CloudFormation parameters to valid types"""

def cast_value(value: Any) -> Union[str, List[Union[str, Resolver]], Resolver]:
if isinstance(value, bool):
Expand Down Expand Up @@ -311,6 +311,7 @@ def is_valid(value: Any) -> bool:
raise InvalidConfigFileError(
f"{self.name}: Values for parameters must be strings, lists or resolvers, got {casted_parameters}"
)

return casted_parameters

def __repr__(self):
Expand Down

0 comments on commit 4f0c7ac

Please sign in to comment.