66from .connectiontypes import (
77 Connection ,
88 ConnectionArguments ,
9+ ConnectionConstructor ,
910 ConnectionCursor ,
11+ ConnectionType ,
1012 Edge ,
13+ EdgeConstructor ,
1114 PageInfo ,
15+ PageInfoConstructor ,
1216)
1317
1418__all__ = [
2428def connection_from_array (
2529 data : Sequence ,
2630 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 :
3135 """Create a connection object from a sequence of objects.
3236
3337 Note that different from its JavaScript counterpart which expects an array,
@@ -54,10 +58,10 @@ def connection_from_array(
5458def connection_from_list (
5559 data : Sequence ,
5660 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 :
6165 """Deprecated alias for connection_from_array.
6266
6367 We're now using the JavaScript terminology in Python as well, since list
@@ -84,10 +88,10 @@ def connection_from_array_slice(
8488 slice_start : int = 0 ,
8589 array_length : int = None ,
8690 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 :
9195 """Create a connection object from a slice of the result set.
9296
9397 Note that different from its JavaScript counterpart which expects an array,
@@ -162,13 +166,13 @@ def connection_from_array_slice(
162166def connection_from_list_slice (
163167 list_slice : Sequence ,
164168 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 ,
168172 slice_start = 0 ,
169173 list_length = 0 ,
170174 list_slice_length = None ,
171- ) -> Connection :
175+ ) -> ConnectionType :
172176 """Deprecated alias for connection_from_array_slice.
173177
174178 We're now using the JavaScript terminology in Python as well, since list
0 commit comments