Skip to content

Commit

Permalink
chore: add type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
felixscherz committed Jan 11, 2025
1 parent 1625ed3 commit 487e65f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions moto/s3tables/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ def list_namespaces(

def get_namespace(self, table_bucket_arn: str, namespace: str) -> Namespace:
bucket = self.table_buckets.get(table_bucket_arn)
if not bucket:
raise ValueError()

return bucket.namespaces[namespace]

Expand Down
2 changes: 1 addition & 1 deletion moto/s3tables/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def delete_table_bucket(self) -> TYPE_RESPONSE:

return 204, {}, ""

def create_namespace(self):
def create_namespace(self) -> TYPE_RESPONSE:
table_bucket_arn = unquote(self.path).lstrip("/").split("/", 1)[-1]
name = json.loads(self.body)["namespace"][0]
namespace = self.s3tables_backend.create_namespace(
Expand Down

0 comments on commit 487e65f

Please sign in to comment.