Commit 4159329
committed
Adding Copilot review: Improve load_all handling and CLI logout parser
Enforce and clarify pagination/parameter behavior and fix CLI parser inheritance.
- brainstem_api_client: always pass options to _build_url; disallow load_all=True when an id is provided; raise a clear ValueError if auto-pagination expects a list but the API response contains no list-valued key; change filter merging to include falsy values (check for None instead of truthiness).
- cli: make the logout subparser inherit common arguments (parents=[common]).
- tests: set mocked response.status_code to 200 for pagination tests.
- README: remove the Contributing section.
These changes make load_all usage safer and errors clearer, ensure logout CLI gets shared options, and update tests to better mock HTTP responses.1 parent 477bcef commit 4159329
File tree
4 files changed
+12
-5
lines changed- brainstem_api_tools
- tests
4 files changed
+12
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | 106 | | |
110 | 107 | | |
111 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
273 | | - | |
| 273 | + | |
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
291 | 294 | | |
292 | 295 | | |
293 | 296 | | |
| |||
310 | 313 | | |
311 | 314 | | |
312 | 315 | | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
313 | 321 | | |
314 | 322 | | |
315 | 323 | | |
| |||
396 | 404 | | |
397 | 405 | | |
398 | 406 | | |
399 | | - | |
| 407 | + | |
400 | 408 | | |
401 | 409 | | |
402 | 410 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
| 306 | + | |
306 | 307 | | |
307 | 308 | | |
308 | 309 | | |
| |||
0 commit comments