Skip to content

feat: accept camelCase keys in input TypedDicts#793

Open
vdusek wants to merge 1 commit into
masterfrom
feat/camel-case-typeddicts
Open

feat: accept camelCase keys in input TypedDicts#793
vdusek wants to merge 1 commit into
masterfrom
feat/camel-case-typeddicts

Conversation

@vdusek
Copy link
Copy Markdown
Contributor

@vdusek vdusek commented May 14, 2026

Summary

Synthesize a <Name>CamelDict sibling for every input TypedDict so users can pass API-shaped dicts (e.g. {'uniqueKey': ..., 'retryCount': ...}) and still satisfy the type checker. The Pydantic alias map extracted from _models.py is the source of truth for the camelCase names; nested TypedDict references in cloned annotations are rewired to their camel variants.

Resource-client signatures in _resource_clients/request_queue.py and the WebhooksList union in _types.py are widened to accept either casing alongside the Pydantic model.

Runtime behavior is unchanged — Pydantic's populate_by_name=True already validates both casings.

Closes #756.

Synthesize a `<Name>CamelDict` sibling for every input TypedDict so users
can pass API-shaped dicts and still satisfy the type checker. Closes #756.
@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 May 14, 2026
@vdusek vdusek self-assigned this May 14, 2026
@github-actions github-actions Bot added this to the 140th sprint - Tooling team milestone May 14, 2026
@github-actions github-actions Bot added the tested Temporary label used only programatically for some analytics. label May 14, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.87%. Comparing base (d1bd5a3) to head (b5d9cdf).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #793      +/-   ##
==========================================
+ Coverage   97.73%   97.87%   +0.13%     
==========================================
  Files          48       48              
  Lines        4860     4938      +78     
==========================================
+ Hits         4750     4833      +83     
+ Misses        110      105       -5     
Flag Coverage Δ
integration 93.98% <100.00%> (+0.32%) ⬆️
unit 86.41% <100.00%> (+0.21%) ⬆️

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 janbuchar May 14, 2026 19:47
@vdusek vdusek marked this pull request as ready for review May 14, 2026 19:47
@janbuchar
Copy link
Copy Markdown
Contributor

Well, the code looks pretty much the way I'd expect it to look - not great, not terrible 🙂 Did you test what the DX feels like? I.e., type checking, completions, ...?

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. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider accepting both snake_case and camelCase values for dicts and Literals

3 participants