Commit 1591a91
committed
fix: use the [] after key names for array variables
This is not a complete fix. We need to re-architect things so that for
the 'params' parameter passed into `requests.request()` we use a list
of tuples. The reason for this is then we can pass in items which
contain the same key but different values. For example we want to be
able to pass [('assigned_ids[]', 1), ('assigned_ids[]', 2)] which is
not something we can do with a dictionary.
1. Create a new CsvStringAttribute class. This is to indicate types
which are sent to the GitLab server as comma-separated-strings
(CSV) but we have been allowing users to use a list-of-strings.
These values are NOT array values, so adding [] to the key name
breaks them.
2. Rename ListAttribute to ArrayAttribute.
3. If a value is of type ArrayAttribute then append '[]' to the name
of the value.1 parent 2cd15ac commit 1591a91Copy full SHA for 1591a91
File tree
Expand file treeCollapse file tree
14 files changed
+97
-48
lines changedOpen diff view settings
Filter options
- gitlab
- v4/objects
- tests/unit
Expand file treeCollapse file tree
14 files changed
+97
-48
lines changedOpen diff view settings
Collapse file
+29-1Lines changed: 29 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
231 | 231 | |
232 | 232 | |
233 | 233 | |
234 | | - |
| 234 | + |
| 235 | + |
| 236 | + |
| 237 | + |
| 238 | + |
| 239 | + |
| 240 | + |
| 241 | + |
| 242 | + |
| 243 | + |
| 244 | + |
235 | 245 | |
236 | 246 | |
237 | 247 | |
| ||
313 | 323 | |
314 | 324 | |
315 | 325 | |
| 326 | + |
| 327 | + |
| 328 | + |
| 329 | + |
| 330 | + |
| 331 | + |
| 332 | + |
| 333 | + |
| 334 | + |
316 | 335 | |
317 | 336 | |
318 | 337 | |
| ||
409 | 428 | |
410 | 429 | |
411 | 430 | |
| 431 | + |
| 432 | + |
| 433 | + |
| 434 | + |
| 435 | + |
| 436 | + |
| 437 | + |
| 438 | + |
| 439 | + |
412 | 440 | |
413 | 441 | |
414 | 442 | |
|
Collapse file
+25-1Lines changed: 25 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
32 | 32 | |
33 | 33 | |
34 | 34 | |
35 | | - |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
36 | 60 | |
37 | 61 | |
38 | 62 | |
|
Collapse file
gitlab/v4/objects/deploy_tokens.py
Copy file name to clipboardExpand all lines: gitlab/v4/objects/deploy_tokens.py+2-2Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
39 | 39 | |
40 | 40 | |
41 | 41 | |
42 | | - |
| 42 | + |
43 | 43 | |
44 | 44 | |
45 | 45 | |
| ||
60 | 60 | |
61 | 61 | |
62 | 62 | |
63 | | - |
| 63 | + |
Collapse file
+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
40 | 40 | |
41 | 41 | |
42 | 42 | |
43 | | - |
| 43 | + |
44 | 44 | |
45 | 45 | |
46 | 46 | |
|
Collapse file
gitlab/v4/objects/groups.py
Copy file name to clipboardExpand all lines: gitlab/v4/objects/groups.py+2-2Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
290 | 290 | |
291 | 291 | |
292 | 292 | |
293 | | - |
| 293 | + |
294 | 294 | |
295 | 295 | |
296 | 296 | |
| ||
350 | 350 | |
351 | 351 | |
352 | 352 | |
353 | | - |
| 353 | + |
354 | 354 | |
355 | 355 | |
356 | 356 | |
|
Collapse file
gitlab/v4/objects/issues.py
Copy file name to clipboardExpand all lines: gitlab/v4/objects/issues.py+3-3Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
63 | 63 | |
64 | 64 | |
65 | 65 | |
66 | | - |
| 66 | + |
67 | 67 | |
68 | 68 | |
69 | 69 | |
| ||
90 | 90 | |
91 | 91 | |
92 | 92 | |
93 | | - |
| 93 | + |
94 | 94 | |
95 | 95 | |
96 | 96 | |
| ||
220 | 220 | |
221 | 221 | |
222 | 222 | |
223 | | - |
| 223 | + |
224 | 224 | |
225 | 225 | |
226 | 226 | |
|
Collapse file
gitlab/v4/objects/members.py
Copy file name to clipboardExpand all lines: gitlab/v4/objects/members.py+2-2Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
39 | 39 | |
40 | 40 | |
41 | 41 | |
42 | | - |
| 42 | + |
43 | 43 | |
44 | 44 | |
45 | 45 | |
| ||
95 | 95 | |
96 | 96 | |
97 | 97 | |
98 | | - |
| 98 | + |
99 | 99 | |
100 | 100 | |
101 | 101 | |
|
Collapse file
gitlab/v4/objects/merge_requests.py
Copy file name to clipboardExpand all lines: gitlab/v4/objects/merge_requests.py+8-11Lines changed: 8 additions & 11 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
95 | 95 | |
96 | 96 | |
97 | 97 | |
98 | | - |
99 | | - |
100 | | - |
101 | | - |
| 98 | + |
| 99 | + |
| 100 | + |
102 | 101 | |
103 | 102 | |
104 | 103 | |
| ||
133 | 132 | |
134 | 133 | |
135 | 134 | |
136 | | - |
137 | | - |
138 | | - |
| 135 | + |
| 136 | + |
139 | 137 | |
140 | 138 | |
141 | 139 | |
| ||
450 | 448 | |
451 | 449 | |
452 | 450 | |
453 | | - |
454 | | - |
455 | | - |
456 | | - |
| 451 | + |
| 452 | + |
| 453 | + |
457 | 454 | |
458 | 455 | |
459 | 456 | |
|
Collapse file
gitlab/v4/objects/milestones.py
Copy file name to clipboardExpand all lines: gitlab/v4/objects/milestones.py+2-2Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
89 | 89 | |
90 | 90 | |
91 | 91 | |
92 | | - |
| 92 | + |
93 | 93 | |
94 | 94 | |
95 | 95 | |
| ||
164 | 164 | |
165 | 165 | |
166 | 166 | |
167 | | - |
| 167 | + |
Collapse file
gitlab/v4/objects/projects.py
Copy file name to clipboardExpand all lines: gitlab/v4/objects/projects.py+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
771 | 771 | |
772 | 772 | |
773 | 773 | |
774 | | - |
| 774 | + |
775 | 775 | |
776 | 776 | |
777 | 777 | |
|
0 commit comments