Skip to content

Conversation

@kafkas
Copy link
Member

@kafkas kafkas commented Dec 8, 2025

Description

Builds on #11077 with a few follow-up improvements:

  • Refines the generated client docstrings so constructor parameters are documented separately for each overload, matching the callable overload signatures.
  • Updates the public API so the token parameter is typed as Callable[[], str].
  • Cleans up stale seed output from the old fixtures that are now split into no-custom-config and token-override sub-fixtures`.
  • Updates the Seed output for the oauth-client-credentials:token-override fixture to reflect the docstring changes.

Note

Improves generated OAuth client constructors by typing token as Callable[[], str], generating overload-specific parameter docs/overloads for token vs client credentials, and updates seed output while removing stale fixtures.

  • Python Generator (Root Client):
    • Refines docstrings for OAuth client-credentials with token override: writes separate parameter blocks per constructor overload and suppresses default param docs when override is enabled.
    • Types token as Callable[[], str] across signatures/overloads and uses the provided callable directly in client wrapper.
    • Adjusts overloads: client_id/client_secret required at the overload level (with env defaults), and token overload requires a callable.
    • Centralizes/uses constant docs for httpx_client and follow_redirects parameters.
  • Seed Output:
    • Updates oauth-client-credentials:token-override fixture to reflect new typings and docstrings.
    • Removes stale seed fixtures (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.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2025

🌱 Seed Test Selector

Select languages to run seed tests for:

  • Python
  • TypeScript
  • Java
  • Go
  • Ruby
  • C#
  • PHP
  • Swift
  • Rust
  • OpenAPI
  • Postman

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.

Copy link

@cursor cursor bot left a 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.

@kafkas kafkas requested a review from tjb9dc December 8, 2025 12:28
@tjb9dc tjb9dc merged commit a30c241 into charlie/oauth-token-python Dec 8, 2025
15 checks passed
@tjb9dc tjb9dc deleted the charlie/oauth-token-python_further-improvements branch December 8, 2025 22:58
tjb9dc added a commit that referenced this pull request Dec 9, 2025
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants