From f05e3c1c3a412d78125020305bf5e06bee52ac3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Duarte?= Date: Fri, 8 Nov 2024 14:15:49 +0000 Subject: [PATCH] Fix Formatting --- .../lib/sync/flows/alias_version_sync_flow.py | 26 ++++++++++--------- .../flows/test_alias_version_sync_flow.py | 2 +- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/samcli/lib/sync/flows/alias_version_sync_flow.py b/samcli/lib/sync/flows/alias_version_sync_flow.py index 34d733a68f..54830be1e7 100644 --- a/samcli/lib/sync/flows/alias_version_sync_flow.py +++ b/samcli/lib/sync/flows/alias_version_sync_flow.py @@ -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 @@ -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 diff --git a/tests/unit/lib/sync/flows/test_alias_version_sync_flow.py b/tests/unit/lib/sync/flows/test_alias_version_sync_flow.py index 36c2b20006..d4684b670a 100644 --- a/tests/unit/lib/sync/flows/test_alias_version_sync_flow.py +++ b/tests/unit/lib/sync/flows/test_alias_version_sync_flow.py @@ -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",