gazu 1.1.0__py2.py3-none-any.whl → 1.1.2__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
gazu/person.py CHANGED
@@ -69,7 +69,7 @@ def get_time_spents_range(
69
69
  "end_date": end_date,
70
70
  }
71
71
  return raw.get(
72
- "/data/persons/{}/time-spents".format(person_id),
72
+ f"/data/persons/{person_id}/time-spents",
73
73
  params=date_range,
74
74
  client=client,
75
75
  )
@@ -88,7 +88,7 @@ def get_all_month_time_spents(
88
88
  """
89
89
  date = date.strftime("%Y/%m")
90
90
  return raw.get(
91
- "data/persons/{}/time-spents/month/all/{}".format(id, date),
91
+ f"data/persons/{id}/time-spents/month/all/{date}",
92
92
  client=client,
93
93
  )
94
94
 
@@ -221,11 +221,9 @@ def get_person_url(person: str | dict, client: KitsuClient = default) -> str:
221
221
  url (str): Web url associated to the given person
222
222
  """
223
223
  person = normalize_model_parameter(person)
224
- path = "{host}/people/{person_id}/"
225
- return path.format(
226
- host=raw.get_api_url_from_host(client=client),
227
- person_id=person["id"],
228
- )
224
+ host = raw.get_api_url_from_host(client=client)
225
+ person_id = person["id"]
226
+ return f"{host}/people/{person_id}/"
229
227
 
230
228
 
231
229
  @cache
@@ -276,7 +274,7 @@ def update_department(department, client=default):
276
274
  """
277
275
  department = normalize_model_parameter(department)
278
276
  return raw.put(
279
- "data/departments/%s" % (department["id"]),
277
+ f"data/departments/{department['id']}",
280
278
  department,
281
279
  client=client,
282
280
  )
@@ -291,7 +289,7 @@ def remove_department(department, force=False, client=default):
291
289
  force (bool): Whether to force deletion of the department.
292
290
  """
293
291
  department = normalize_model_parameter(department)
294
- path = "data/departments/%s" % department["id"]
292
+ path = f"data/departments/{department['id']}"
295
293
  params = {}
296
294
  if force:
297
295
  params = {"force": True}
@@ -369,7 +367,7 @@ def update_person(person: dict, client: KitsuClient = default) -> dict:
369
367
 
370
368
  person = normalize_model_parameter(person)
371
369
  return raw.put(
372
- "data/persons/%s" % (person["id"]),
370
+ f"data/persons/{person['id']}",
373
371
  person,
374
372
  client=client,
375
373
  )
@@ -385,7 +383,7 @@ def remove_person(
385
383
  person (dict): Person to remove.
386
384
  """
387
385
  person = normalize_model_parameter(person)
388
- path = "data/persons/%s" % person["id"]
386
+ path = f"data/persons/{person['id']}"
389
387
  params = {}
390
388
  if force:
391
389
  params = {"force": True}
@@ -476,7 +474,7 @@ def set_avatar(
476
474
  """
477
475
  person = normalize_model_parameter(person)
478
476
  return raw.upload(
479
- "/pictures/thumbnails/persons/%s" % person["id"],
477
+ f"/pictures/thumbnails/persons/{person['id']}",
480
478
  file_path,
481
479
  client=client,
482
480
  )
@@ -494,7 +492,7 @@ def get_presence_log(
494
492
  Returns:
495
493
  str: The presence log table (in CSV) for given month and year.
496
494
  """
497
- path = "data/persons/presence-logs/%s-%s" % (year, str(month).zfill(2))
495
+ path = f"data/persons/presence-logs/{year}-{str(month).zfill(2)}"
498
496
  return raw.get(path, json_response=False, client=client)
499
497
 
500
498
 
@@ -513,7 +511,7 @@ def change_password_for_person(
513
511
  """
514
512
  person = normalize_model_parameter(person)
515
513
  return raw.post(
516
- "actions/persons/%s/change-password" % (person["id"]),
514
+ f"actions/persons/{person['id']}/change-password",
517
515
  {"password": password, "password_2": password},
518
516
  client=client,
519
517
  )
@@ -533,7 +531,7 @@ def invite_person(
533
531
  """
534
532
  person = normalize_model_parameter(person)
535
533
  return raw.get(
536
- "actions/persons/%s/invite" % (person["id"]),
534
+ f"actions/persons/{person['id']}/invite",
537
535
  client=client,
538
536
  )
539
537
 
@@ -554,7 +552,7 @@ def get_time_spents_by_date(
554
552
  """
555
553
  person = normalize_model_parameter(person)
556
554
  return raw.get(
557
- "data/persons/%s/time-spents/by-date" % person["id"],
555
+ f"data/persons/{person['id']}/time-spents/by-date",
558
556
  params={"date": date},
559
557
  client=client,
560
558
  )
@@ -577,7 +575,7 @@ def get_week_time_spents(
577
575
  """
578
576
  person = normalize_model_parameter(person)
579
577
  return raw.get(
580
- "data/persons/%s/time-spents/week/%s/%s" % (person["id"], year, week),
578
+ f"data/persons/{person['id']}/time-spents/week/{year}/{week}",
581
579
  client=client,
582
580
  )
583
581
 
@@ -598,7 +596,7 @@ def get_year_time_spents(
598
596
  """
599
597
  person = normalize_model_parameter(person)
600
598
  return raw.get(
601
- "data/persons/%s/time-spents/year/%s" % (person["id"], year),
599
+ f"data/persons/{person['id']}/time-spents/year/{year}",
602
600
  client=client,
603
601
  )
604
602
 
@@ -617,7 +615,7 @@ def get_day_offs(
617
615
  list: Day offs for the person.
618
616
  """
619
617
  person = normalize_model_parameter(person)
620
- return raw.fetch_all("persons/%s/day-offs" % person["id"], client=client)
618
+ return raw.fetch_all(f"persons/{person['id']}/day-offs", client=client)
621
619
 
622
620
 
623
621
  @cache
@@ -637,7 +635,7 @@ def get_week_day_offs(
637
635
  """
638
636
  person = normalize_model_parameter(person)
639
637
  return raw.get(
640
- "data/persons/%s/day-offs/week/%s/%s" % (person["id"], year, week),
638
+ f"data/persons/{person['id']}/day-offs/week/{year}/{week}",
641
639
  client=client,
642
640
  )
643
641
 
@@ -659,8 +657,7 @@ def get_month_day_offs(
659
657
  """
660
658
  person = normalize_model_parameter(person)
661
659
  return raw.get(
662
- "data/persons/%s/day-offs/month/%s/%s"
663
- % (person["id"], year, str(month).zfill(2)),
660
+ f"data/persons/{person['id']}/day-offs/month/{year}/{str(month).zfill(2)}",
664
661
  client=client,
665
662
  )
666
663
 
@@ -681,7 +678,7 @@ def get_year_day_offs(
681
678
  """
682
679
  person = normalize_model_parameter(person)
683
680
  return raw.get(
684
- "data/persons/%s/day-offs/year/%s" % (person["id"], year),
681
+ f"data/persons/{person['id']}/day-offs/year/{year}",
685
682
  client=client,
686
683
  )
687
684
 
@@ -702,7 +699,7 @@ def add_person_to_department(
702
699
  person = normalize_model_parameter(person)
703
700
  department = normalize_model_parameter(department)
704
701
  return raw.post(
705
- "data/persons/%s/departments" % person["id"],
702
+ f"data/persons/{person['id']}/departments",
706
703
  {"department_id": department["id"]},
707
704
  client=client,
708
705
  )
@@ -724,7 +721,7 @@ def remove_person_from_department(
724
721
  person = normalize_model_parameter(person)
725
722
  department = normalize_model_parameter(department)
726
723
  return raw.delete(
727
- "data/persons/%s/departments/%s" % (person["id"], department["id"]),
724
+ f"data/persons/{person['id']}/departments/{department['id']}",
728
725
  client=client,
729
726
  )
730
727
 
@@ -743,7 +740,7 @@ def disable_two_factor_authentication(
743
740
  """
744
741
  person = normalize_model_parameter(person)
745
742
  return raw.delete(
746
- "data/persons/%s/two-factor-authentication" % person["id"],
743
+ f"data/persons/{person['id']}/two-factor-authentication",
747
744
  client=client,
748
745
  )
749
746
 
@@ -761,4 +758,4 @@ def clear_person_avatar(
761
758
  Response: Request response object.
762
759
  """
763
760
  person = normalize_model_parameter(person)
764
- return raw.delete("data/persons/%s/avatar" % person["id"], client=client)
761
+ return raw.delete(f"data/persons/{person['id']}/avatar", client=client)
gazu/playlist.py CHANGED
@@ -55,7 +55,7 @@ def all_playlists_for_project(
55
55
  project = normalize_model_parameter(project)
56
56
  return sort_by_name(
57
57
  raw.fetch_all(
58
- "projects/%s/playlists" % project["id"],
58
+ f"projects/{project['id']}/playlists",
59
59
  params={"page": page},
60
60
  client=client,
61
61
  )
@@ -76,11 +76,7 @@ def all_playlists_for_episode(
76
76
  project = normalize_model_parameter(episode["project_id"])
77
77
  return sort_by_name(
78
78
  raw.fetch_all(
79
- "projects/%s/episodes/%s/playlists"
80
- % (
81
- project["id"],
82
- episode["id"],
83
- ),
79
+ f"projects/{project['id']}/episodes/{episode['id']}/playlists",
84
80
  client=client,
85
81
  )
86
82
  )
@@ -164,9 +160,7 @@ def update_playlist(playlist: dict, client: KitsuClient = default) -> dict:
164
160
  Returns:
165
161
  dict: Updated playlist.
166
162
  """
167
- return raw.put(
168
- "data/playlists/%s" % playlist["id"], playlist, client=client
169
- )
163
+ return raw.put(f"data/playlists/{playlist['id']}", playlist, client=client)
170
164
 
171
165
 
172
166
  def get_entity_preview_files(
@@ -183,7 +177,7 @@ def get_entity_preview_files(
183
177
  """
184
178
  entity = normalize_model_parameter(entity)
185
179
  return raw.get(
186
- "data/playlists/entities/%s/preview-files" % entity["id"],
180
+ f"data/playlists/entities/{entity['id']}/preview-files",
187
181
  client=client,
188
182
  )
189
183
 
@@ -301,7 +295,7 @@ def delete_playlist(
301
295
  Response: Request response object.
302
296
  """
303
297
  playlist = normalize_model_parameter(playlist)
304
- return raw.delete("data/playlists/%s" % playlist["id"], client=client)
298
+ return raw.delete(f"data/playlists/{playlist['id']}", client=client)
305
299
 
306
300
 
307
301
  @cache
@@ -319,7 +313,7 @@ def get_entity_previews(
319
313
  """
320
314
  playlist = normalize_model_parameter(playlist)
321
315
  return raw.fetch_all(
322
- "playlists/%s/entity-previews" % playlist["id"], client=client
316
+ f"playlists/{playlist['id']}/entity-previews", client=client
323
317
  )
324
318
 
325
319
 
@@ -353,7 +347,7 @@ def remove_build_job(
353
347
  """
354
348
  build_job = normalize_model_parameter(build_job)
355
349
  return raw.delete(
356
- "data/playlists/build-jobs/%s" % build_job["id"], client=client
350
+ f"data/playlists/build-jobs/{build_job['id']}", client=client
357
351
  )
358
352
 
359
353
 
@@ -371,9 +365,7 @@ def all_build_jobs_for_project(
371
365
  list: All build jobs for the project.
372
366
  """
373
367
  project = normalize_model_parameter(project)
374
- return raw.fetch_all(
375
- "projects/%s/build-jobs" % project["id"], client=client
376
- )
368
+ return raw.fetch_all(f"projects/{project['id']}/build-jobs", client=client)
377
369
 
378
370
 
379
371
  def build_playlist_movie(
@@ -390,7 +382,7 @@ def build_playlist_movie(
390
382
  """
391
383
  playlist = normalize_model_parameter(playlist)
392
384
  return raw.post(
393
- "data/playlists/%s/build-movie" % playlist["id"], {}, client=client
385
+ f"data/playlists/{playlist['id']}/build-movie", {}, client=client
394
386
  )
395
387
 
396
388
 
@@ -413,10 +405,7 @@ def download_playlist_build(
413
405
  """
414
406
  playlist = normalize_model_parameter(playlist)
415
407
  build_job = normalize_model_parameter(build_job)
416
- path = "data/playlists/%s/build-jobs/%s/download" % (
417
- playlist["id"],
418
- build_job["id"],
419
- )
408
+ path = f"data/playlists/{playlist['id']}/build-jobs/{build_job['id']}/download"
420
409
  return raw.download(path, file_path, client=client)
421
410
 
422
411
 
@@ -434,7 +423,7 @@ def download_playlist_zip(
434
423
  Response: Request response object.
435
424
  """
436
425
  playlist = normalize_model_parameter(playlist)
437
- path = "data/playlists/%s/download/zip" % playlist["id"]
426
+ path = f"data/playlists/{playlist['id']}/download/zip"
438
427
  return raw.download(path, file_path, client=client)
439
428
 
440
429
 
@@ -453,7 +442,7 @@ def generate_temp_playlist(
453
442
  """
454
443
  project = normalize_model_parameter(project)
455
444
  return raw.post(
456
- "data/projects/%s/playlists/temp" % project["id"], data, client=client
445
+ f"data/projects/{project['id']}/playlists/temp", data, client=client
457
446
  )
458
447
 
459
448
 
@@ -471,5 +460,5 @@ def notify_clients_playlist_ready(
471
460
  """
472
461
  playlist = normalize_model_parameter(playlist)
473
462
  return raw.post(
474
- "data/playlists/%s/notify-clients" % playlist["id"], {}, client=client
463
+ f"data/playlists/{playlist['id']}/notify-clients", {}, client=client
475
464
  )
gazu/project.py CHANGED
@@ -83,12 +83,9 @@ def get_project_url(
83
83
  url (str): Web url associated to the given project
84
84
  """
85
85
  project = normalize_model_parameter(project)
86
- path = "{host}/productions/{project_id}/{section}/"
87
- return path.format(
88
- host=raw.get_api_url_from_host(client=client),
89
- project_id=project["id"],
90
- section=section,
91
- )
86
+ host = raw.get_api_url_from_host(client=client)
87
+ project_id = project["id"]
88
+ return f"{host}/productions/{project_id}/{section}/"
92
89
 
93
90
 
94
91
  @cache
@@ -161,7 +158,7 @@ def remove_project(
161
158
  project (dict / str): Project to remove.
162
159
  """
163
160
  project = normalize_model_parameter(project)
164
- path = "data/projects/%s" % project["id"]
161
+ path = f"data/projects/{project['id']}"
165
162
  if force:
166
163
  path += "?force=true"
167
164
  return raw.delete(path, client=client)
@@ -192,7 +189,7 @@ def update_project(project: dict, client: KitsuClient = default) -> dict:
192
189
  project["task_types"] = normalize_list_of_models_for_links(
193
190
  project["task_types"]
194
191
  )
195
- return raw.put("data/projects/%s" % project["id"], project, client=client)
192
+ return raw.put(f"data/projects/{project['id']}", project, client=client)
196
193
 
197
194
 
198
195
  def update_project_data(
@@ -245,7 +242,7 @@ def add_asset_type(
245
242
  asset_type = normalize_model_parameter(asset_type)
246
243
  data = {"asset_type_id": asset_type["id"]}
247
244
  return raw.post(
248
- "data/projects/%s/settings/asset-types" % project["id"],
245
+ f"data/projects/{project['id']}/settings/asset-types",
249
246
  data,
250
247
  client=client,
251
248
  )
@@ -261,7 +258,7 @@ def add_task_type(
261
258
  task_type = normalize_model_parameter(task_type)
262
259
  data = {"task_type_id": task_type["id"], "priority": priority}
263
260
  return raw.post(
264
- "data/projects/%s/settings/task-types" % project["id"],
261
+ f"data/projects/{project['id']}/settings/task-types",
265
262
  data,
266
263
  client=client,
267
264
  )
@@ -274,7 +271,7 @@ def add_task_status(
274
271
  task_status = normalize_model_parameter(task_status)
275
272
  data = {"task_status_id": task_status["id"]}
276
273
  return raw.post(
277
- "data/projects/%s/settings/task-status" % project["id"],
274
+ f"data/projects/{project['id']}/settings/task-status",
278
275
  data,
279
276
  client=client,
280
277
  )
@@ -314,7 +311,7 @@ def add_metadata_descriptor(
314
311
  "departments": normalize_list_of_models_for_links(departments),
315
312
  }
316
313
  return raw.post(
317
- "data/projects/%s/metadata-descriptors" % project["id"],
314
+ f"data/projects/{project['id']}/metadata-descriptors",
318
315
  data,
319
316
  client=client,
320
317
  )
@@ -338,7 +335,7 @@ def get_metadata_descriptor(
338
335
  project = normalize_model_parameter(project)
339
336
  metadata_descriptor = normalize_model_parameter(metadata_descriptor_id)
340
337
  return raw.fetch_one(
341
- "projects/%s/metadata-descriptors" % project["id"],
338
+ f"projects/{project['id']}/metadata-descriptors",
342
339
  metadata_descriptor["id"],
343
340
  client=client,
344
341
  )
@@ -382,7 +379,7 @@ def all_metadata_descriptors(
382
379
  """
383
380
  project = normalize_model_parameter(project)
384
381
  return raw.fetch_all(
385
- "projects/%s/metadata-descriptors" % project["id"],
382
+ f"projects/{project['id']}/metadata-descriptors",
386
383
  client=client,
387
384
  )
388
385
 
@@ -411,8 +408,7 @@ def update_metadata_descriptor(
411
408
 
412
409
  project = normalize_model_parameter(project)
413
410
  return raw.put(
414
- "data/projects/%s/metadata-descriptors/%s"
415
- % (project["id"], metadata_descriptor["id"]),
411
+ f"data/projects/{project['id']}/metadata-descriptors/{metadata_descriptor['id']}",
416
412
  metadata_descriptor,
417
413
  client=client,
418
414
  )
@@ -437,8 +433,7 @@ def remove_metadata_descriptor(
437
433
  if force:
438
434
  params = {"force": True}
439
435
  return raw.delete(
440
- "data/projects/%s/metadata-descriptors/%s"
441
- % (project["id"], metadata_descriptor["id"]),
436
+ f"data/projects/{project['id']}/metadata-descriptors/{metadata_descriptor['id']}",
442
437
  params,
443
438
  client=client,
444
439
  )
@@ -455,7 +450,7 @@ def get_team(project: str | dict, client: KitsuClient = default) -> list[dict]:
455
450
  list[dict]: The list of user dicts that are part of the project team.
456
451
  """
457
452
  project = normalize_model_parameter(project)
458
- return raw.fetch_all("projects/%s/team" % project["id"], client=client)
453
+ return raw.fetch_all(f"projects/{project['id']}/team", client=client)
459
454
 
460
455
 
461
456
  def add_person_to_team(
@@ -474,9 +469,7 @@ def add_person_to_team(
474
469
  project = normalize_model_parameter(project)
475
470
  person = normalize_model_parameter(person)
476
471
  data = {"person_id": person["id"]}
477
- return raw.post(
478
- "data/projects/%s/team" % project["id"], data, client=client
479
- )
472
+ return raw.post(f"data/projects/{project['id']}/team", data, client=client)
480
473
 
481
474
 
482
475
  def remove_person_from_team(
@@ -492,7 +485,7 @@ def remove_person_from_team(
492
485
  project = normalize_model_parameter(project)
493
486
  person = normalize_model_parameter(person)
494
487
  return raw.delete(
495
- "data/projects/%s/team/%s" % (project["id"], person["id"]),
488
+ f"data/projects/{project['id']}/team/{person['id']}",
496
489
  client=client,
497
490
  )
498
491
 
@@ -512,7 +505,7 @@ def get_project_task_types(
512
505
  """
513
506
  project = normalize_model_parameter(project)
514
507
  return raw.fetch_all(
515
- "projects/%s/settings/task-types" % project["id"], client=client
508
+ f"projects/{project['id']}/settings/task-types", client=client
516
509
  )
517
510
 
518
511
 
@@ -531,7 +524,7 @@ def get_project_task_statuses(
531
524
  """
532
525
  project = normalize_model_parameter(project)
533
526
  return raw.fetch_all(
534
- "projects/%s/settings/task-status" % project["id"], client=client
527
+ f"projects/{project['id']}/settings/task-status", client=client
535
528
  )
536
529
 
537
530
 
@@ -550,7 +543,7 @@ def all_status_automations(
550
543
  """
551
544
  project = normalize_model_parameter(project)
552
545
  return raw.fetch_all(
553
- "projects/%s/settings/status-automations" % project["id"],
546
+ f"projects/{project['id']}/settings/status-automations",
554
547
  client=client,
555
548
  )
556
549
 
@@ -573,7 +566,7 @@ def add_status_automation(
573
566
  """
574
567
  project = normalize_model_parameter(project)
575
568
  return raw.post(
576
- "data/projects/%s/settings/status-automations" % project["id"],
569
+ f"data/projects/{project['id']}/settings/status-automations",
577
570
  automation,
578
571
  client=client,
579
572
  )
@@ -592,8 +585,7 @@ def remove_status_automation(
592
585
  project = normalize_model_parameter(project)
593
586
  automation = normalize_model_parameter(automation)
594
587
  return raw.delete(
595
- "data/projects/%s/settings/status-automations/%s"
596
- % (project["id"], automation["id"]),
588
+ f"data/projects/{project['id']}/settings/status-automations/{automation['id']}",
597
589
  client=client,
598
590
  )
599
591
 
@@ -610,7 +602,7 @@ def get_preview_background_files(
610
602
  """
611
603
  project = normalize_model_parameter(project)
612
604
  return raw.fetch_all(
613
- "projects/%s/settings/preview-background-files" % project["id"],
605
+ f"projects/{project['id']}/settings/preview-background-files",
614
606
  client=client,
615
607
  )
616
608
 
@@ -636,7 +628,7 @@ def add_preview_background_file(
636
628
  """
637
629
  project = normalize_model_parameter(project)
638
630
  return raw.post(
639
- "data/projects/%s/settings/preview-background-files" % project["id"],
631
+ f"data/projects/{project['id']}/settings/preview-background-files",
640
632
  background_file,
641
633
  client=client,
642
634
  )
@@ -657,8 +649,7 @@ def remove_preview_background_file(
657
649
  project = normalize_model_parameter(project)
658
650
  background_file = normalize_model_parameter(background_file)
659
651
  return raw.delete(
660
- "data/projects/%s/settings/preview-background-files/%s"
661
- % (project["id"], background_file["id"]),
652
+ f"data/projects/{project['id']}/settings/preview-background-files/{background_file['id']}",
662
653
  client=client,
663
654
  )
664
655
 
@@ -674,9 +665,7 @@ def get_milestones(
674
665
  project (dict / ID): The project dict or id.
675
666
  """
676
667
  project = normalize_model_parameter(project)
677
- return raw.fetch_all(
678
- "projects/%s/milestones" % project["id"], client=client
679
- )
668
+ return raw.fetch_all(f"projects/{project['id']}/milestones", client=client)
680
669
 
681
670
 
682
671
  @cache
@@ -690,7 +679,7 @@ def get_project_quotas(
690
679
  project (dict / ID): The project dict or id.
691
680
  """
692
681
  project = normalize_model_parameter(project)
693
- return raw.fetch_all("projects/%s/quotas" % project["id"], client=client)
682
+ return raw.fetch_all(f"projects/{project['id']}/quotas", client=client)
694
683
 
695
684
 
696
685
  @cache
@@ -707,7 +696,7 @@ def get_project_person_quotas(
707
696
  project = normalize_model_parameter(project)
708
697
  person = normalize_model_parameter(person)
709
698
  return raw.fetch_all(
710
- "projects/%s/person-quotas" % project["id"],
699
+ f"projects/{project['id']}/person-quotas",
711
700
  params={"person_id": person["id"]},
712
701
  client=client,
713
702
  )
@@ -724,7 +713,7 @@ def get_budgets(
724
713
  project (dict / ID): The project dict or id.
725
714
  """
726
715
  project = normalize_model_parameter(project)
727
- return raw.fetch_all("projects/%s/budgets" % project["id"], client=client)
716
+ return raw.fetch_all(f"projects/{project['id']}/budgets", client=client)
728
717
 
729
718
 
730
719
  def create_budget(
@@ -762,7 +751,7 @@ def create_budget(
762
751
  if amount is not None:
763
752
  data["amount"] = amount
764
753
  return raw.post(
765
- "data/projects/%s/budgets" % project["id"], data, client=client
754
+ f"data/projects/{project['id']}/budgets", data, client=client
766
755
  )
767
756
 
768
757
 
@@ -780,7 +769,7 @@ def get_budget(
780
769
  project = normalize_model_parameter(project)
781
770
  budget = normalize_model_parameter(budget)
782
771
  return raw.fetch_one(
783
- "projects/%s/budgets" % project["id"], budget["id"], client=client
772
+ f"projects/{project['id']}/budgets", budget["id"], client=client
784
773
  )
785
774
 
786
775
 
@@ -801,7 +790,7 @@ def update_budget(
801
790
  project = normalize_model_parameter(project)
802
791
  budget = normalize_model_parameter(budget)
803
792
  return raw.put(
804
- "data/projects/%s/budgets/%s" % (project["id"], budget["id"]),
793
+ f"data/projects/{project['id']}/budgets/{budget['id']}",
805
794
  data,
806
795
  client=client,
807
796
  )
@@ -820,7 +809,7 @@ def remove_budget(
820
809
  project = normalize_model_parameter(project)
821
810
  budget = normalize_model_parameter(budget)
822
811
  return raw.delete(
823
- "data/projects/%s/budgets/%s" % (project["id"], budget["id"]),
812
+ f"data/projects/{project['id']}/budgets/{budget['id']}",
824
813
  client=client,
825
814
  )
826
815
 
@@ -839,7 +828,7 @@ def get_budget_entries(
839
828
  project = normalize_model_parameter(project)
840
829
  budget = normalize_model_parameter(budget)
841
830
  return raw.fetch_all(
842
- "projects/%s/budgets/%s/entries" % (project["id"], budget["id"]),
831
+ f"projects/{project['id']}/budgets/{budget['id']}/entries",
843
832
  client=client,
844
833
  )
845
834
 
@@ -886,7 +875,7 @@ def create_budget_entry(
886
875
  if category is not None:
887
876
  data["category"] = category
888
877
  return raw.post(
889
- "data/projects/%s/budgets/%s/entries" % (project["id"], budget["id"]),
878
+ f"data/projects/{project['id']}/budgets/{budget['id']}/entries",
890
879
  data,
891
880
  client=client,
892
881
  )
@@ -911,7 +900,7 @@ def get_budget_entry(
911
900
  budget = normalize_model_parameter(budget)
912
901
  entry = normalize_model_parameter(entry)
913
902
  return raw.fetch_one(
914
- "projects/%s/budgets/%s/entries" % (project["id"], budget["id"]),
903
+ f"projects/{project['id']}/budgets/{budget['id']}/entries",
915
904
  entry["id"],
916
905
  client=client,
917
906
  )
@@ -937,8 +926,7 @@ def update_budget_entry(
937
926
  budget = normalize_model_parameter(budget)
938
927
  entry = normalize_model_parameter(entry)
939
928
  return raw.put(
940
- "data/projects/%s/budgets/%s/entries/%s"
941
- % (project["id"], budget["id"], entry["id"]),
929
+ f"data/projects/{project['id']}/budgets/{budget['id']}/entries/{entry['id']}",
942
930
  data,
943
931
  client=client,
944
932
  )
@@ -962,7 +950,6 @@ def remove_budget_entry(
962
950
  budget = normalize_model_parameter(budget)
963
951
  entry = normalize_model_parameter(entry)
964
952
  return raw.delete(
965
- "data/projects/%s/budgets/%s/entries/%s"
966
- % (project["id"], budget["id"], entry["id"]),
953
+ f"data/projects/{project['id']}/budgets/{budget['id']}/entries/{entry['id']}",
967
954
  client=client,
968
955
  )