Skip to content

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 24 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

❗ There is a different number of reports uploaded between BASE (7895a4e) and HEAD (d4601d7). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (7895a4e) HEAD (d4601d7)
integration 1 0
Additional details and impacted files
@@             Coverage Diff             @@
##           master     #644       +/-   ##
===========================================
- Coverage   96.62%   75.60%   -21.03%     
===========================================
  Files          45       45               
  Lines        4271     4271               
===========================================
- Hits         4127     3229      -898     
- Misses        144     1042      +898     
Flag Coverage Δ
integration ?
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
@danpoletaev danpoletaev force-pushed the refactor/enforce-keyword-only-args branch from d4601d7 to 2fdc892 Compare March 6, 2026 21:55
@B4nan B4nan force-pushed the refactor/enforce-keyword-only-args branch from 2fdc892 to d4601d7 Compare March 6, 2026 22:54
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