Skip to content

Commit

Permalink
Fix invariant argument typings (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorJohn authored Jan 2, 2024
1 parent 2992752 commit 719695d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion aiogqlc/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
AsyncGenerator,
Dict,
List,
Mapping,
Optional,
Tuple,
Type,
Expand Down Expand Up @@ -209,7 +210,7 @@ async def execute(
query: str,
variables: Optional[Variables] = None,
operation: Optional[str] = None,
**kwargs: Dict[str, object],
**kwargs: Mapping[str, object],
) -> aiohttp.ClientResponse:
nulled_variables, files_to_paths_mapping = self.prepare(variables)
data_param: Dict[str, Union[aiohttp.FormData, Payload]]
Expand Down
6 changes: 3 additions & 3 deletions aiogqlc/types.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from io import IOBase
from typing import Any, Dict, List, Literal, TypedDict, Union
from typing import Any, Dict, List, Literal, Mapping, TypedDict, Union

from typing_extensions import NotRequired, Required, TypeAlias

Expand All @@ -10,10 +10,10 @@
float,
IOBase,
List["VariableValue"],
Dict[str, "VariableValue"],
Mapping[str, "VariableValue"],
]

Variables: TypeAlias = Dict[str, VariableValue]
Variables: TypeAlias = Mapping[str, VariableValue]

FilesToPathsMapping: TypeAlias = Dict[IOBase, List[str]]

Expand Down

0 comments on commit 719695d

Please sign in to comment.