1
+ from gitlab import types
1
2
from gitlab .base import RESTManager , RESTObject
2
3
from gitlab .mixins import ListMixin
3
4
@@ -16,11 +17,37 @@ class GroupIterationManager(ListMixin, RESTManager):
16
17
_path = "/groups/{group_id}/iterations"
17
18
_obj_cls = GroupIteration
18
19
_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" ,
8000
27
+ "in" ,
28
+ "search" ,
29
+ "state" ,
30
+ "updated_after" ,
31
+ "updated_before" ,
32
+ )
33
+ _types = {"in" : types .ArrayAttribute }
20
34
21
35
22
36
class ProjectIterationManager (ListMixin , RESTManager ):
23
37
_path = "/projects/{project_id}/iterations"
24
38
_obj_cls = GroupIteration
25
39
_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