1+ from gitlab import types
12from gitlab .base import RESTManager , RESTObject
23from gitlab .mixins import ListMixin
34
@@ -16,11 +17,37 @@ class GroupIterationManager(ListMixin, RESTManager):
1617 _path = "/groups/{group_id}/iterations"
1718 _obj_cls = GroupIteration
1819 _from_parent_attrs = {"group_id" : "id" }
19- _list_filters = ("state" , "search" , "include_ancestors" )
20+ # When using the API, the "in" keyword collides with python's "in" keyword
21+ # raising a SyntaxError.
22+ # For this reason, we have to use the query_parameters argument:
23+ # group.iterations.list(query_parameters={"in": "title"})
24+ _list_filters = (
25+ "include_ancestors" ,
26+ "include_descendants" ,
27+ "in" ,
28+ "search" ,
29+ "state" ,
30+ "updated_after" ,
31+ "updated_before" ,
32+ )
33+ _types = {"in" : types .ArrayAttribute }
2034
2135
2236class ProjectIterationManager (ListMixin , RESTManager ):
2337 _path = "/projects/{project_id}/iterations"
2438 _obj_cls = GroupIteration
2539 _from_parent_attrs = {"project_id" : "id" }
26- _list_filters = ("state" , "search" , "include_ancestors" )
40+ # When using the API, the "in" keyword collides with python's "in" keyword
41+ # raising a SyntaxError.
42+ # For this reason, we have to use the query_parameters argument:
43+ # project.iterations.list(query_parameters={"in": "title"})
44+ _list_filters = (
45+ "include_ancestors" ,
46+ "include_descendants" ,
47+ "in" ,
48+ "search" ,
49+ "state" ,
50+ "updated_after" ,
51+ "updated_before" ,
52+ )
53+ _types = {"in" : types .ArrayAttribute }
0 commit comments