6
6
from .connectiontypes import (
7
7
Connection ,
8
8
ConnectionArguments ,
9
+ ConnectionConstructor ,
9
10
ConnectionCursor ,
11
+ ConnectionType ,
10
12
Edge ,
13
+ EdgeConstructor ,
11
14
PageInfo ,
15
+ PageInfoConstructor ,
12
16
)
13
17
14
18
__all__ = [
24
28
def connection_from_array (
25
29
data : Sequence ,
26
30
args : ConnectionArguments = None ,
27
- connection_type : Any = Connection ,
28
- edge_type : Any = Edge ,
29
- page_info_type : Any = PageInfo ,
30
- ) -> Connection :
31
+ connection_type : ConnectionConstructor = Connection ,
32
+ edge_type : EdgeConstructor = Edge ,
33
+ page_info_type : PageInfoConstructor = PageInfo ,
34
+ ) -> ConnectionType :
31
35
"""Create a connection object from a sequence of objects.
32
36
33
37
Note that different from its JavaScript counterpart which expects an array,
@@ -54,10 +58,10 @@ def connection_from_array(
54
58
def connection_from_list (
55
59
data : Sequence ,
56
60
args : ConnectionArguments = None ,
57
- connection_type : Any = Connection ,
58
- edge_type : Any = Edge ,
59
- pageinfo_type : Any = PageInfo ,
60
- ) -> Connection :
61
+ connection_type : ConnectionConstructor = Connection ,
62
+ edge_type : EdgeConstructor = Edge ,
63
+ pageinfo_type : PageInfoConstructor = PageInfo ,
64
+ ) -> ConnectionType :
61
65
"""Deprecated alias for connection_from_array.
62
66
63
67
We're now using the JavaScript terminology in Python as well, since list
@@ -84,10 +88,10 @@ def connection_from_array_slice(
84
88
slice_start : int = 0 ,
85
89
array_length : int = None ,
86
90
array_slice_length : int = None ,
87
- connection_type : Any = Connection ,
88
- edge_type : Any = Edge ,
89
- page_info_type : Any = PageInfo ,
90
- ) -> Connection :
91
+ connection_type : ConnectionConstructor = Connection ,
92
+ edge_type : EdgeConstructor = Edge ,
93
+ page_info_type : PageInfoConstructor = PageInfo ,
94
+ ) -> ConnectionType :
91
95
"""Create a connection object from a slice of the result set.
92
96
93
97
Note that different from its JavaScript counterpart which expects an array,
@@ -162,13 +166,13 @@ def connection_from_array_slice(
162
166
def connection_from_list_slice (
163
167
list_slice : Sequence ,
164
168
args : ConnectionArguments = None ,
165
- connection_type : Any = Connection ,
166
- edge_type : Any = Edge ,
167
- pageinfo_type : Any = PageInfo ,
169
+ connection_type : ConnectionConstructor = Connection ,
170
+ edge_type : EdgeConstructor = Edge ,
171
+ pageinfo_type : PageInfoConstructor = PageInfo ,
168
172
slice_start = 0 ,
169
173
list_length = 0 ,
170
174
list_slice_length = None ,
171
- ) -> Connection :
175
+ ) -> ConnectionType :
172
176
"""Deprecated alias for connection_from_array_slice.
173
177
174
178
We're now using the JavaScript terminology in Python as well, since list
0 commit comments