From dd532e5f75c6e5671c2fdde8687f65fa9fd11134 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Nov 2024 22:31:11 +0000 Subject: [PATCH 1/2] chore(deps-dev): bump mypy from 1.11.2 to 1.13.0 in /requirements Bumps [mypy](https://github.com/python/mypy) from 1.11.2 to 1.13.0. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.11.2...v1.13.0) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements/dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/dev.txt b/requirements/dev.txt index 854e5ded66..a503468d23 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -8,7 +8,7 @@ pytest-cov==5.0.0 # type checking and related stubs # mypy adds new rules in new minor versions, which could cause our PR check to fail # here we fix its version and upgrade it manually in the future -mypy==1.11.2 +mypy==1.13.0 types-pywin32==308.0.0.20241029 types-PyYAML==6.0.12.20240917 types-chevron==0.14.2.20240310 From 23e126f0d3a2ed1110c4d9e372bae279fa28d0ed Mon Sep 17 00:00:00 2001 From: Mehmet Nuri Deveci <5735811+mndeveci@users.noreply.github.com> Date: Thu, 14 Nov 2024 16:58:13 -0800 Subject: [PATCH 2/2] fix typing issues --- .../hook_packages/terraform/hooks/prepare/resource_linking.py | 2 +- samcli/lib/build/workflow_config.py | 2 +- samcli/lib/sync/flows/layer_sync_flow.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py b/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py index 7b1e339644..d5ca491af2 100644 --- a/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py +++ b/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py @@ -357,7 +357,7 @@ def _link_using_linking_fields(self, cfn_resource: Dict) -> None: child_resources_linking_attributes_logical_id_mapping, ) - dest_resources = [ + dest_resources: List[ReferenceType] = [ ( LogicalIdReference( value=child_resources_linking_attributes_logical_id_mapping[value][0], diff --git a/samcli/lib/build/workflow_config.py b/samcli/lib/build/workflow_config.py index b5a250e3df..dce42be413 100644 --- a/samcli/lib/build/workflow_config.py +++ b/samcli/lib/build/workflow_config.py @@ -238,7 +238,7 @@ def get_workflow_config( ) from ex -def supports_specified_workflow(specified_workflow: str) -> bool: +def supports_specified_workflow(specified_workflow: Optional[str]) -> bool: """ Given a specified workflow, returns whether it is supported in container builds, can be used to overwrite runtime and get docker image or not diff --git a/samcli/lib/sync/flows/layer_sync_flow.py b/samcli/lib/sync/flows/layer_sync_flow.py index a8e60f0c09..5d094b1db5 100644 --- a/samcli/lib/sync/flows/layer_sync_flow.py +++ b/samcli/lib/sync/flows/layer_sync_flow.py @@ -409,8 +409,8 @@ def sync(self) -> None: return # Check function uses layer - old_layer_arn = [layer_arn for layer_arn in layer_arns if layer_arn.startswith(self._layer_arn)] - old_layer_arn = old_layer_arn[0] if len(old_layer_arn) == 1 else None + old_layer_arns = [layer_arn for layer_arn in layer_arns if layer_arn.startswith(self._layer_arn)] + old_layer_arn = old_layer_arns[0] if len(old_layer_arns) == 1 else None if not old_layer_arn: LOG.warning( "%sLambda Function (%s) does not have layer (%s).%s",