Skip to content

Conversation

@thepetk
Copy link

@thepetk thepetk commented Nov 2, 2025

What does this PR do?

This PR improves type hint cleanup in auto-generated provider documentation by adding regex logic.

Issues Fixed:

  • Type hints with missing closing brackets (e.g., list[str instead of list[str])
  • Types showing as <class 'bool'>, <class 'str'> instead of bool, str
  • The multi-line YAML frontmatter in index documentation files wasn't ideal, so we now add the proper | character.

Changes:

  1. Replaced string replacement (.replace) with regex-based type cleaning to preserve the trailing bracket in case of list and dict.
  2. Adds the | character for multi-line YAML descriptions.
  3. I have regenerated the docs. However, let me know if that's not needed.

Test Plan

  1. Ran uv run python scripts/provider_codegen.py - successfully regenerated all docs
  2. We can see that the updated docs handle correctly type hint cleanup and multi-line yaml descriptions have now the | character.

Note to the reviewer(s)

This is my first contribution to your lovely repo! Initially I was going thourgh docs (wanted to use remote::gemini as provider) and realized the issue. I've read the CONTRIBUTING.md and decided to open the PR. Let me know if there's anything I did wrong and I'll update my PR!

@meta-cla
Copy link

meta-cla bot commented Nov 2, 2025

Hi @thepetk!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@meta-cla
Copy link

meta-cla bot commented Nov 2, 2025

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 2, 2025
@mergify
Copy link

mergify bot commented Nov 7, 2025

This pull request has merge conflicts that must be resolved before it can be merged. @thepetk please rebase it. https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify bot added the needs-rebase label Nov 7, 2025
@mergify mergify bot removed the needs-rebase label Nov 7, 2025
Copy link
Contributor

@ashwinb ashwinb 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 great thank you. so much better!

@thepetk
Copy link
Author

thepetk commented Nov 9, 2025

this is great thank you. so much better!

@ashwinb thanks for approving, I have a small issue with the pre-commit check, as the check fails. Pushed
0912fbe too as it seems that my profile imported as a default value when I generated again the docs (might worth looking into it in a separate PR)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants