From 9e2628ee7c723ec8daa5e906016bdd38bfeb6d42 Mon Sep 17 00:00:00 2001 From: briandevans <252620095+briandevans@users.noreply.github.com> Date: Sun, 26 Apr 2026 22:37:47 -0700 Subject: [PATCH] test(discord): annotate make_attachment content_type as Optional[str] Copilot review: the helper accepted None in one test but was annotated str. Matches actual usage where no-content-type attachments are a tested scenario. Co-Authored-By: Claude Opus 4.7 (1M context) --- tests/gateway/test_discord_document_handling.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/gateway/test_discord_document_handling.py b/tests/gateway/test_discord_document_handling.py index a22e0f0d66..d3ad137b61 100644 --- a/tests/gateway/test_discord_document_handling.py +++ b/tests/gateway/test_discord_document_handling.py @@ -9,6 +9,7 @@ import os import sys from datetime import datetime, timezone from types import SimpleNamespace +from typing import Optional from unittest.mock import AsyncMock, MagicMock, patch import pytest @@ -111,7 +112,7 @@ def adapter(monkeypatch): def make_attachment( *, filename: str, - content_type: str, + content_type: Optional[str], size: int = 1024, url: str = "https://cdn.discordapp.com/attachments/fake/file", ) -> SimpleNamespace: