Skip to content

refactor: Replace kwargs.pop with explicit resource_path keyword arguments#648

Open
vdusek wants to merge 3 commits intomasterfrom
refactor/resolve-resource-path-kwargs-pop
Open

refactor: Replace kwargs.pop with explicit resource_path keyword arguments#648
vdusek wants to merge 3 commits intomasterfrom
refactor/resolve-resource-path-kwargs-pop

Conversation

@vdusek
Copy link
Contributor

@vdusek vdusek commented Feb 25, 2026

Summary

  • Replace the kwargs.pop('resource_path', ...) anti-pattern with proper keyword arguments in all resource client __init__ methods.
  • Improves type safety, readability, and IDE support across 22 files (44 sync/async class pairs).
  • Special handling for UserClient (resource_id: str | None = None, resolved to 'me') and RequestQueueClient (retains extra client_key param).

Test plan

  • CI passes

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vdusek vdusek added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels Feb 25, 2026
@vdusek vdusek self-assigned this Feb 25, 2026
@vdusek vdusek requested a review from Pijukatel February 25, 2026 15:00
@github-actions github-actions bot added this to the 135th sprint - Tooling team milestone Feb 25, 2026
vdusek and others added 2 commits February 25, 2026 16:07
LogClient is a sub-resource client (e.g. /actor-runs/{id}/log) that
does not receive its own resource_id from callers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
DatasetClient, KeyValueStoreClient, and RequestQueueClient are also
used as sub-resources of runs (e.g. /actor-runs/{id}/dataset) where
no resource_id is passed by callers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Feb 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.67%. Comparing base (230bb64) to head (e204bed).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #648      +/-   ##
==========================================
+ Coverage   96.62%   96.67%   +0.04%     
==========================================
  Files          45       47       +2     
  Lines        4271     4965     +694     
==========================================
+ Hits         4127     4800     +673     
- Misses        144      165      +21     
Flag Coverage Δ
integration 94.11% <100.00%> (-0.57%) ⬇️
unit 76.97% <60.00%> (+1.37%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vdusek vdusek requested a review from Pijukatel February 26, 2026 14:20
@vdusek vdusek force-pushed the refactor/resolve-resource-path-kwargs-pop branch from 53abed9 to e204bed Compare February 26, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants