chore: reformat

This commit is contained in:
can1357
2026-06-02 08:43:23 +02:00
parent 0bc9bc25b4
commit 2ecb5fd9fa
8 changed files with 716 additions and 198 deletions
+6 -2
View File
@@ -9,7 +9,9 @@ from .protocol import JsonObject
TPayload = TypeVar("TPayload")
HostUriContentType: TypeAlias = Literal["text/markdown", "application/json", "text/plain"]
HostUriContentType: TypeAlias = Literal[
"text/markdown", "application/json", "text/plain"
]
class HostUriReadResult(TypedDict, total=False):
@@ -99,7 +101,9 @@ def normalize_read_result(value: HostUriReadValue) -> JsonObject:
if isinstance(value, str):
return {"content": value}
if not isinstance(value, dict):
raise TypeError("Host URI read handlers must return a string or a HostUriReadResult mapping")
raise TypeError(
"Host URI read handlers must return a string or a HostUriReadResult mapping"
)
payload: JsonObject = {}
if "content" not in value: