Skip to content

Comments

refactor!: Enforce keyword-only arguments across all APIs#644

Draft
vdusek wants to merge 1 commit intomasterfrom
refactor/enforce-keyword-only-args
Draft

refactor!: Enforce keyword-only arguments across all APIs#644
vdusek wants to merge 1 commit intomasterfrom
refactor/enforce-keyword-only-args

Conversation

@vdusek
Copy link
Contributor

@vdusek vdusek commented Feb 24, 2026

Summary

  • Add * separator to all function and method signatures (117 functions across 16 files in src/) to enforce keyword-only argument passing
  • Update all internal callers (707 call sites across src/ and tests/), documentation examples (31 docs files), and website examples to use keyword syntax
  • Only 2 functions intentionally skipped: RedirectLogFormatter.format and _ContextInjectingFilter.filter (logging framework overrides called positionally by Python internals)

BREAKING CHANGE

All function parameters (beyond self/cls) are now keyword-only. Callers must use func(param=value) instead of func(value).

Test plan

  • All 219 unit tests pass
  • ruff check passes (zero lint errors)
  • ruff format passes (all files formatted)
  • ty check passes on src/ and docs/ (zero new type errors)
  • Pre-commit hooks pass
  • Integration tests (CI)

🤖 Generated with Claude Code

…nal APIs

Add `*` separator to all function and method signatures (117 functions across 16 files)
to enforce keyword-only argument passing. Update all internal callers (707 call sites in
src/ and tests/), documentation examples (31 docs files), and website examples to use
keyword syntax.

BREAKING CHANGE: All function parameters (beyond self/cls) are now keyword-only.
Callers must use `func(param=value)` instead of `func(value)`.

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 24, 2026
@vdusek vdusek self-assigned this Feb 24, 2026
@vdusek vdusek requested a review from Pijukatel February 24, 2026 11:13
@github-actions github-actions bot added this to the 135th sprint - Tooling team milestone Feb 24, 2026
@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

❌ Patch coverage is 47.11538% with 165 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.60%. Comparing base (7895a4e) to head (d4601d7).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...rc/apify_client/_resource_clients/request_queue.py 35.13% 24 Missing ⚠️
...apify_client/_resource_clients/_resource_client.py 40.74% 16 Missing ⚠️
src/apify_client/_resource_clients/run.py 23.80% 16 Missing ⚠️
.../apify_client/_resource_clients/key_value_store.py 57.14% 15 Missing ⚠️
src/apify_client/_resource_clients/task.py 0.00% 12 Missing ⚠️
src/apify_client/_resource_clients/actor.py 35.29% 11 Missing ⚠️
src/apify_client/_resource_clients/dataset.py 42.85% 8 Missing ⚠️
src/apify_client/_resource_clients/schedule.py 0.00% 8 Missing ⚠️
src/apify_client/_resource_clients/user.py 0.00% 8 Missing ⚠️
src/apify_client/_resource_clients/webhook.py 0.00% 8 Missing ⚠️
... and 15 more
Additional details and impacted files
@@           Coverage Diff           @@
##           master     #644   +/-   ##
=======================================
  Coverage   75.60%   75.60%           
=======================================
  Files          45       45           
  Lines        4271     4271           
=======================================
  Hits         3229     3229           
  Misses       1042     1042           
Flag Coverage Δ
unit 75.60% <47.11%> (ø)

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 removed the request for review from Pijukatel February 24, 2026 11:18
@vdusek vdusek marked this pull request as draft February 24, 2026 11:18
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.

1 participant