-
Notifications
You must be signed in to change notification settings - Fork 270
feat(python): further improvements to OAuth token override support #11091
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(python): further improvements to OAuth token override support #11091
Conversation
🌱 Seed Test SelectorSelect languages to run seed tests for:
How to use: Click the ⋯ menu above → "Edit" → check the boxes you want → click "Update comment". Tests will run automatically and snapshots will be committed to this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on January 2
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
generators/python/src/fern_python/generators/sdk/client_generator/root_client_generator.py
Show resolved
Hide resolved
generators/python/src/fern_python/generators/sdk/client_generator/root_client_generator.py
Outdated
Show resolved
Hide resolved
generators/python/src/fern_python/generators/sdk/client_generator/root_client_generator.py
Show resolved
Hide resolved
generators/python/src/fern_python/generators/sdk/client_generator/root_client_generator.py
Outdated
Show resolved
Hide resolved
* undiscriminated union for oauth mechanism * add support for multiline comments * add unit tests * add seed * update comments on generated root client * handle environment variable configuration on token override path * update minor version * apply formatting * fix ci failure * update seeds and fix ci * fix ci * fixing ci again * feat(python): further improvements to OAuth token override support (#11091) * Display constructor overloads separately in client docstring * Commit seed output for token-override fixture * Delete redundant files * Fix `write_parameter_docstring` check * Write docstrings with constructor param nodes * Make token param callable * Update seed for fixture * Fix incorrect param type * handle env vars case --------- Co-authored-by: Charlie <[email protected]> Co-authored-by: Anar Kafkas <[email protected]> Co-authored-by: Thomas Baker <[email protected]>
Description
Builds on #11077 with a few follow-up improvements:
tokenparameter is typed asCallable[[], str].no-custom-configandtoken-overridesub-fixtures`.oauth-client-credentials:token-overridefixture to reflect the docstring changes.Note
Improves generated OAuth client constructors by typing
tokenasCallable[[], str], generating overload-specific parameter docs/overloads for token vs client credentials, and updates seed output while removing stale fixtures.tokenasCallable[[], str]across signatures/overloads and uses the provided callable directly in client wrapper.client_id/client_secretrequired at the overload level (with env defaults), andtokenoverload requires a callable.httpx_clientandfollow_redirectsparameters.oauth-client-credentials:token-overridefixture to reflect new typings and docstrings.oauth-client-credentials,oauth-client-credentials-environment-variables,pagination) and related files.Written by Cursor Bugbot for commit 3fcb30d. This will update automatically on new commits. Configure here.