Skip to content

Commit

Permalink
chore: run linter
Browse files Browse the repository at this point in the history
  • Loading branch information
felixscherz committed Jan 7, 2025
1 parent 6579202 commit ce64faf
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions pyiceberg/catalog/s3tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ def _validate_namespace_identifier(self, namespace: Union[str, Identifier]) -> s
namespace = self.identifier_to_database(namespace)

if not S3TABLES_VALID_NAME_REGEX.fullmatch(namespace) or namespace == S3TABLES_RESERVED_NAMESPACE:
raise InvalidNamespaceName("The specified namespace name is not valid. See https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-buckets-naming.html for naming rules.")
raise InvalidNamespaceName(
"The specified namespace name is not valid. See https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-buckets-naming.html for naming rules."
)

return namespace

Expand All @@ -127,7 +129,9 @@ def _validate_database_and_table_identifier(self, identifier: Union[str, Identif
namespace = self._validate_namespace_identifier(namespace)

if not S3TABLES_VALID_NAME_REGEX.fullmatch(table_name):
raise InvalidTableName("The specified table name is not valid. See https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-buckets-naming.html for naming rules.")
raise InvalidTableName(
"The specified table name is not valid. See https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-buckets-naming.html for naming rules."
)

return namespace, table_name

Expand Down Expand Up @@ -161,7 +165,9 @@ def create_table(
) from e

try:
response = self.s3tables.get_table_metadata_location(tableBucketARN=self.table_bucket_arn, namespace=namespace, name=table_name)
response = self.s3tables.get_table_metadata_location(
tableBucketARN=self.table_bucket_arn, namespace=namespace, name=table_name
)
warehouse_location = response["warehouseLocation"]

metadata_location = self._get_metadata_location(location=warehouse_location)
Expand Down

0 comments on commit ce64faf

Please sign in to comment.