Skip to content

Commit cd289c0

Browse files
committed
TypedDict isn't compatible with Dict, but is with Mapping
Using Mapping allows us to give MessageDict object and such directly, without casting them as Dict. Related Mypy issue: python/mypy#4976
1 parent 3863265 commit cd289c0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/chainlit/client/cloud.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import asyncio
22
import uuid
3-
from typing import Any, Dict, Optional, cast
3+
from typing import Any, Dict, Mapping, Optional, cast
44

55
import aiohttp
66
from python_graphql_client import GraphqlClient
@@ -44,7 +44,7 @@ def check_for_errors(self, response: Dict[str, Any], raise_error: bool = False):
4444
return False
4545

4646
async def mutation(
47-
self, mutation: str, variables: Dict[str, Any] = {}
47+
self, mutation: str, variables: Mapping[str, Any] = {}
4848
) -> Dict[str, Any]:
4949
"""
5050
Execute a GraphQL mutation.

0 commit comments

Comments
 (0)