Skip to content

Commit

Permalink
Fix more invariant argument types (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorJohn authored Jan 2, 2024
1 parent 719695d commit 992c5a6
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 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, Mapping, TypedDict, Union
from typing import Any, Dict, List, Literal, Mapping, Sequence, TypedDict, Union

from typing_extensions import NotRequired, Required, TypeAlias

Expand All @@ -9,24 +9,24 @@
None,
float,
IOBase,
List["VariableValue"],
Sequence["VariableValue"],
Mapping[str, "VariableValue"],
]

Variables: TypeAlias = Mapping[str, VariableValue]

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

ConnectionInitParamValue: TypeAlias = Union[
None,
str,
int,
float,
List["ConnectionInitParamValue"],
Dict[str, "ConnectionInitParamValue"],
Sequence["ConnectionInitParamValue"],
Mapping[str, "ConnectionInitParamValue"],
]

ConnectionInitParams: TypeAlias = Dict[str, ConnectionInitParamValue]
ConnectionInitParams: TypeAlias = Mapping[str, ConnectionInitParamValue]

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


class Payload(TypedDict):
Expand All @@ -40,7 +40,7 @@ class Payload(TypedDict):

class GraphQLWSConnectionInitMessage(TypedDict):
type: Literal["connection_init"]
payload: Dict[str, Any]
payload: Mapping[str, Any]


class GraphQLWSStartMessage(TypedDict):
Expand Down

0 comments on commit 992c5a6

Please sign in to comment.