Repository navigation
Python: docs(core): fix positional invocations in detect_media_type_from_base64 docstrings - #8614
Merged
Eduard van Valkenburg (eavanvalkenburg) merged 1 commit intoSep 22, 2026
Conversation
…64 docstrings The function signature of detect_media_type_from_base64 uses keyword only arguments (*). The code examples in the docstrings of detect_media_type_from_base64 and Content.from_data passed string variables positionally, which raises a TypeError when executed directly. Updating the examples to pass data_str and data_uri keyword arguments ensures the documentation samples run cleanly. Signed-off-by: Manohar Paturi <186662190+ManoharPaturi@users.noreply.github.com>
Manohar Paturi (ManoharPaturi)
temporarily deployed
to
github-app-auth
September 21, 2026 17:51 — with
GitHub Actions
Inactive
Manohar Paturi (ManoharPaturi)
temporarily deployed
to
github-app-auth
September 21, 2026 17:51 — with
GitHub Actions
Inactive
Manohar Paturi (ManoharPaturi)
temporarily deployed
to
github-app-auth
September 21, 2026 17:51 — with
GitHub Actions
Inactive
Manohar Paturi (ManoharPaturi)
temporarily deployed
to
github-app-auth
September 21, 2026 17:51 — with
GitHub Actions
Inactive
Member
|
Manohar Paturi (@ManoharPaturi) Thanks for the contribution. Before this can move forward, please update the PR body to use the repository’s current PR template and complete its |
Manohar Paturi (ManoharPaturi)
temporarily deployed
to
github-app-auth
September 22, 2026 12:55 — with
GitHub Actions
Inactive
Contributor
Author
|
Eduard van Valkenburg (@eavanvalkenburg) Thanks for the heads up. I have updated the PR description with the repository template, including Motivation & Context, Description & Review Guide, and the Contribution Checklist. |
Eduard van Valkenburg (eavanvalkenburg)
approved these changes
Sep 22, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation & Context
The function signature of
detect_media_type_from_base64uses keyword-only arguments (*,data_bytes,data_str,data_uri).The docstring code examples on
detect_media_type_from_base64andContent.from_datapreviously passed string arguments positionally. If a developer copied and executed the docstring code directly, Python raised aTypeError: detect_media_type_from_base64() takes 0 positional arguments but 1 was given.Updating these examples to supply
data_str=anddata_uri=keyword arguments ensures the documentation is accurate and runnable as written.Description & Review Guide
What are the major changes?
In
python/packages/core/agent_framework/_types.py, updated docstring examples fordetect_media_type_from_base64andContent.from_datato invokedetect_media_type_from_base64usingdata_str=...ordata_uri=...keyword arguments instead of positional arguments.What is the impact of these changes?
Documentation examples will run without raising
TypeError.What do you want reviewers to focus on?
Docstring example consistency with the function's keyword-only signature in
python/packages/core/agent_framework/_types.py.Related Issue
None
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.