Commit 67a87c5
authored
Consistently return Boolean for delete methods (#359)
Resolves #356
When deleting a model, Replicate's API returns with a 204 and an empty
response body. The client library fails to decode this and raises and
exception.
This PR updates the `replicate.models.delete` method to return `bool`
instead to indicate success. It also harmonizes the other delete methods
for deployments and files to do the same.
Signed-off-by: Mattt Zmuda <mattt@replicate.com>1 parent d5f5e27 commit 67a87c5
3 files changed
+25
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
361 | | - | |
| 361 | + | |
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
369 | | - | |
| 369 | + | |
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
| 373 | + | |
373 | 374 | | |
374 | | - | |
| 375 | + | |
375 | 376 | | |
376 | 377 | | |
377 | 378 | | |
378 | 379 | | |
379 | 380 | | |
380 | 381 | | |
381 | 382 | | |
382 | | - | |
| 383 | + | |
383 | 384 | | |
384 | 385 | | |
385 | 386 | | |
| 387 | + | |
386 | 388 | | |
387 | 389 | | |
388 | 390 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
| 140 | + | |
140 | 141 | | |
141 | | - | |
| 142 | + | |
142 | 143 | | |
143 | 144 | | |
144 | | - | |
| 145 | + | |
| 146 | + | |
145 | 147 | | |
146 | 148 | | |
147 | 149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
290 | | - | |
| 290 | + | |
291 | 291 | | |
292 | 292 | | |
293 | | - | |
| 293 | + | |
294 | 294 | | |
295 | | - | |
| 295 | + | |
296 | 296 | | |
297 | 297 | | |
298 | | - | |
299 | 298 | | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
300 | 302 | | |
301 | 303 | | |
302 | | - | |
303 | | - | |
| 304 | + | |
304 | 305 | | |
305 | 306 | | |
306 | | - | |
| 307 | + | |
307 | 308 | | |
308 | 309 | | |
309 | | - | |
| 310 | + | |
310 | 311 | | |
311 | | - | |
| 312 | + | |
312 | 313 | | |
313 | | - | |
| 314 | + | |
314 | 315 | | |
315 | | - | |
316 | | - | |
317 | 316 | | |
318 | | - | |
| 317 | + | |
319 | 318 | | |
320 | | - | |
321 | 319 | | |
322 | 320 | | |
323 | | - | |
324 | | - | |
| 321 | + | |
325 | 322 | | |
326 | 323 | | |
327 | 324 | | |
| |||
0 commit comments