From 8bf04fc28638609f3b11559409738ffba6c851e2 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Tue, 29 Dec 2020 15:37:11 +0200 Subject: [PATCH] Reformat files using black. --- etebase_fastapi/collection.py | 10 ++++++++-- etebase_fastapi/sendfile/utils.py | 4 +++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/etebase_fastapi/collection.py b/etebase_fastapi/collection.py index 9e25b38..14abee9 100644 --- a/etebase_fastapi/collection.py +++ b/etebase_fastapi/collection.py @@ -534,14 +534,20 @@ def fetch_updates( @item_router.post("/item/transaction/", dependencies=[Depends(has_write_access), *PERMISSIONS_READWRITE]) def item_transaction( - collection_uid: str, data: ItemBatchIn, stoken: t.Optional[str] = None, user: UserType = Depends(get_authenticated_user) + collection_uid: str, + data: ItemBatchIn, + stoken: t.Optional[str] = None, + user: UserType = Depends(get_authenticated_user), ): return item_bulk_common(data, user, stoken, collection_uid, validate_etag=True) @item_router.post("/item/batch/", dependencies=[Depends(has_write_access), *PERMISSIONS_READWRITE]) def item_batch( - collection_uid: str, data: ItemBatchIn, stoken: t.Optional[str] = None, user: UserType = Depends(get_authenticated_user) + collection_uid: str, + data: ItemBatchIn, + stoken: t.Optional[str] = None, + user: UserType = Depends(get_authenticated_user), ): return item_bulk_common(data, user, stoken, collection_uid, validate_etag=False) diff --git a/etebase_fastapi/sendfile/utils.py b/etebase_fastapi/sendfile/utils.py index 7c8b1f2..c35d6df 100644 --- a/etebase_fastapi/sendfile/utils.py +++ b/etebase_fastapi/sendfile/utils.py @@ -56,7 +56,9 @@ def _sanitize_path(filepath): try: filepath_abs.relative_to(path_root) except ValueError: - raise HttpError("generic", "{} wrt {} is impossible".format(filepath_abs, path_root), status_code=status.HTTP_404_NOT_FOUND) + raise HttpError( + "generic", "{} wrt {} is impossible".format(filepath_abs, path_root), status_code=status.HTTP_404_NOT_FOUND + ) return filepath_abs