diff --git a/pyiceberg/catalog/dynamodb.py b/pyiceberg/catalog/dynamodb.py index 220313ab74..62a4da5108 100644 --- a/pyiceberg/catalog/dynamodb.py +++ b/pyiceberg/catalog/dynamodb.py @@ -704,7 +704,7 @@ def _convert_dynamo_table_item_to_iceberg_table(self, dynamo_table_item: dict[st DYNAMODB_COL_NAMESPACE, DYNAMODB_COL_CREATED_AT, ]: - if prop not in table_dict.keys(): + if prop not in table_dict: raise NoSuchPropertyException(f"Iceberg required property {prop} is missing: {dynamo_table_item}") table_type = table_dict[_add_property_prefix(TABLE_TYPE)] diff --git a/pyiceberg/table/update/snapshot.py b/pyiceberg/table/update/snapshot.py index 8feebb9901..5ca3eb7a73 100644 --- a/pyiceberg/table/update/snapshot.py +++ b/pyiceberg/table/update/snapshot.py @@ -1008,7 +1008,7 @@ def merge_manifests(self, manifests: list[ManifestFile]) -> list[ManifestFile]: groups = self._group_by_spec(manifests) merged_manifests = [] - for spec_id in reversed(groups.keys()): + for spec_id in reversed(groups): merged_manifests.extend(self._merge_group(first_manifest, spec_id, groups[spec_id])) return merged_manifests