Skip to content

Commit

Permalink
Fix Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
driverpt committed Nov 8, 2024
1 parent 85f0ea9 commit f05e3c1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
26 changes: 14 additions & 12 deletions samcli/lib/sync/flows/alias_version_sync_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ class AliasVersionSyncFlow(SyncFlow):
_lambda_client: Any

def __init__(
self,
function_identifier: str,
alias_name: str,
delete_old_alias: bool,
build_context: "BuildContext",
deploy_context: "DeployContext",
sync_context: "SyncContext",
physical_id_mapping: Dict[str, str],
stacks: Optional[List[Stack]] = None,
self,
function_identifier: str,
alias_name: str,
delete_old_alias: bool,
build_context: "BuildContext",
deploy_context: "DeployContext",
sync_context: "SyncContext",
physical_id_mapping: Dict[str, str],
stacks: Optional[List[Stack]] = None,
):
"""
Parameters
Expand Down Expand Up @@ -118,8 +118,10 @@ def _equality_keys(self) -> Any:

def _get_version_alias_if_exists(self) -> Optional[str]:
try:
return str(self._lambda_client.get_alias(FunctionName=self.get_physical_id(self._function_identifier),
Name=self._alias_name)
.get("FunctionVersion"))
return str(
self._lambda_client.get_alias(
FunctionName=self.get_physical_id(self._function_identifier), Name=self._alias_name
).get("FunctionVersion")
)
except self._lambda_client.exceptions.ResourceNotFoundException:
return None
2 changes: 1 addition & 1 deletion tests/unit/lib/sync/flows/test_alias_version_sync_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


class TestAliasVersionSyncFlow(TestCase):
def create_sync_flow(self, delete_old_alias = False):
def create_sync_flow(self, delete_old_alias=False):
sync_flow = AliasVersionSyncFlow(
"Function1",
"Alias1",
Expand Down

0 comments on commit f05e3c1

Please sign in to comment.