chore: reformat
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user