Skip to content

Commit 2db322e

Browse files
committed
Removing empty return statements + type hinting returns none
1 parent 6f53998 commit 2db322e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

api/endpoints/upload_route.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ async def upload_chunk(
2626
chunk_number: Annotated[int, Form()],
2727
total_chunks: Annotated[int, Form()],
2828
chunk_hash: Annotated[str, Form()],
29-
):
29+
) -> None:
3030
"""
3131
Allow individual chunks to be uploaded and later reassembled.
3232
@@ -56,7 +56,6 @@ async def upload_chunk(
5656

5757
if chunk_number == total_chunks - 1:
5858
reassemble_file(total_chunks, file.filename)
59-
return
6059
except Exception as e:
6160
logger.error(f"Error during chunk upload: {e}")
6261
raise HTTPException(status_code=500, detail=str(e)) from e
@@ -66,7 +65,7 @@ async def upload_chunk(
6665
async def upload_single(
6766
file: Annotated[UploadFile, File()],
6867
file_hash: Annotated[str, Form()],
69-
):
68+
) -> None:
7069
"""
7170
Upload a single file.
7271
@@ -87,7 +86,6 @@ async def upload_single(
8786
logger.info(f"Hash matches: {calculate_md5_checksum(file_content, file_hash)}")
8887

8988
save_file(file)
90-
return
9189
except Exception as e:
9290
logger.error(f"Error during file upload: {e}")
9391
raise HTTPException(status_code=500, detail=str(e)) from e

0 commit comments

Comments
 (0)