File tree Expand file tree Collapse file tree 2 files changed +34
-2
lines changed Expand file tree Collapse file tree 2 files changed +34
-2
lines changed Original file line number Diff line number Diff line change @@ -31,3 +31,13 @@ List iterations for a project's ancestor groups::
31
31
List iterations for a group::
32
32
33
33
iterations = group.iterations.list()
34
+
35
+ Unavailable filters or filters conflicts::
36
+
37
+ In case you are trying to pass a parameter that collides with a python
38
+ keyword (i.e. `in`) or with python-gitlab's internal arguments, you'll have
39
+ to use the `query_parameters` argument:
40
+
41
+ ```
42
+ group.iterations.list(query_parameters={"in": "title"})
43
+ ```
Original file line number Diff line number Diff line change @@ -16,11 +16,33 @@ class GroupIterationManager(ListMixin, RESTManager):
16
16
_path = "/groups/{group_id}/iterations"
17
17
_obj_cls = GroupIteration
18
18
_from_parent_attrs = {"group_id" : "id" }
19
- _list_filters = ("state" , "search" , "include_ancestors" )
19
+ # When using the API, the "in" keyword collides with python's "in" keyword raising a SyntaxError.
20
+ # For this reason, we have to use the query_parameters argument:
21
+ # group.iterations.list(query_parameters={"in": "title"})
22
+ _list_filters = (
23
+ "include_ancestors" ,
24
+ "include_descendants" ,
25
+ "in" ,
26
+ "search" ,
27
+ "state" ,
28
+ "updated_after" ,
29
+ "updated_before" ,
30
+ )
20
31
21
32
22
33
class ProjectIterationManager (ListMixin , RESTManager ):
23
34
_path = "/projects/{project_id}/iterations"
24
35
_obj_cls = GroupIteration
25
36
_from_parent_attrs = {"project_id" : "id" }
26
- _list_filters = ("state" , "search" , "include_ancestors" )
37
+ # When using the API, the "in" keyword collides with python's "in" keyword raising a SyntaxError.
38
+ # For this reason, we have to use the query_parameters argument:
39
+ # group.iterations.list(query_parameters={"in": "title"})
40
+ _list_filters = (
41
+ "include_ancestors" ,
42
+ "include_descendants" ,
43
+ "in" ,
44
+ "search" ,
45
+ "state" ,
46
+ "updated_after" ,
47
+ "updated_before" ,
48
+ )
You can’t perform that action at this time.
0 commit comments