fix: apply black formatting to reports.py and dmarc_parser.py

Agent-Logs-Url: https://github.com/christianlouis/dmarq/sessions/b108ee4f-3479-43fa-a9e9-23a697718aa3

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-03-29 11:05:07 +00:00
parent d580da6fee
commit 821d9dc863
2 changed files with 4 additions and 12 deletions
+3 -9
View File
@@ -66,9 +66,7 @@ def _validate_upload_file(file: UploadFile, file_content: bytes) -> None:
"""
# Security: Validate filename is provided
if not file.filename:
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST, detail="Filename is required"
)
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail="Filename is required")
# Security: Validate file extension
file_ext = "." + file.filename.rsplit(".", 1)[-1].lower() if "." in file.filename else ""
@@ -97,13 +95,9 @@ def _handle_upload_value_error(filename: str, error_message: str) -> None:
status_code=status.HTTP_413_REQUEST_ENTITY_TOO_LARGE, detail="File too large"
)
elif "zip bomb" in error_message.lower():
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST, detail="Invalid archive file"
)
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail="Invalid archive file")
else:
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST, detail="Invalid report format"
)
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail="Invalid report format")
class UploadResponse(BaseModel):