From be177a9b404cc96ec2d433550721d65b751197e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Rafael=20Siqueira?= Date: Sat, 24 May 2025 11:29:37 -0300 Subject: [PATCH] fix exception --- layercake/layercake/dynamodb.py | 4 ++-- layercake/pyproject.toml | 2 +- layercake/uv.lock | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/layercake/layercake/dynamodb.py b/layercake/layercake/dynamodb.py index c543edd..c44d811 100644 --- a/layercake/layercake/dynamodb.py +++ b/layercake/layercake/dynamodb.py @@ -313,8 +313,8 @@ class TransactKey: pairs: tuple[KeyPair, ...] = () def __add__(self, other: SortKey | KeyPair) -> 'TransactKey': - if not isinstance(other, SortKey): - raise TypeError('Can only add a SortKey to a TransactKey') + if not isinstance(other, (SortKey, KeyPair)): + raise TypeError('Can only add a SortKey and KeyPair to a TransactKey') if isinstance(other, SortKey): other = KeyPair(self.pk, other) diff --git a/layercake/pyproject.toml b/layercake/pyproject.toml index 5ea55fb..80a8ae4 100644 --- a/layercake/pyproject.toml +++ b/layercake/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "layercake" -version = "0.3.4" +version = "0.3.5" description = "Packages shared dependencies to optimize deployment and ensure consistency across functions." readme = "README.md" authors = [ diff --git a/layercake/uv.lock b/layercake/uv.lock index b6ea58d..e28b77d 100644 --- a/layercake/uv.lock +++ b/layercake/uv.lock @@ -589,7 +589,7 @@ wheels = [ [[package]] name = "layercake" -version = "0.3.3" +version = "0.3.4" source = { editable = "." } dependencies = [ { name = "arnparse" },