Skip to content

[python] Remove "None" from known values in api_version docstring#10105

Merged
msyyc merged 5 commits into
mainfrom
copilot/optimize-docstring-api-version
Mar 24, 2026
Merged

[python] Remove "None" from known values in api_version docstring#10105
msyyc merged 5 commits into
mainfrom
copilot/optimize-docstring-api-version

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 20, 2026

  • Fix: Remove "and None" from known values in api_version docstring in parameter.py
  • Add changelog entry under .chronus/changes
  • Manually verify the fix works correctly for both api_version and non-api_version parameters
  • Run existing unit tests (all pass)
  • Code review passed (no issues)
  • Security scan passed (no alerts)
Original prompt

This section details on the original issue you should resolve

<issue_title>[python] optimize docstring about api_version in generated SDK</issue_title>
<issue_description>Bot's review comment makes sense Azure/azure-sdk-for-python#45814 (comment):

Image</issue_description>

Comments on the Issue (you are @copilot in this section)


📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

The api_version parameter is typed as `str` and None is not a valid API
version value. Including "None" in the "Known values" list was misleading
as passing api_version=None would flow through to request serialization
rather than falling back to the default.

Before: Known values are "2026-01-01-preview" and None.
After: Known values are "2026-01-01-preview".

Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Copilot AI changed the title [WIP] Optimize docstring about api_version in generated SDK [python] Remove "None" from known values in api_version docstring Mar 20, 2026
Copilot AI requested a review from msyyc March 20, 2026 04:12
@microsoft-github-policy-service microsoft-github-policy-service Bot added the emitter:client:python Issue for the Python client emitter: @typespec/http-client-python label Mar 20, 2026
@msyyc msyyc marked this pull request as ready for review March 20, 2026 05:01
@azure-sdk
Copy link
Copy Markdown
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Mar 23, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/http-client-python@10105

commit: 65cef9c

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 23, 2026

All changed packages have been documented.

  • @typespec/http-client-python
Show changes

@typespec/http-client-python - fix ✏️

Remove None from "Known values" in api_version parameter docstring since the parameter is typed as str and None is not a valid API version value.

Copilot AI requested a review from msyyc March 23, 2026 06:16
@msyyc msyyc enabled auto-merge March 23, 2026 07:22
@msyyc msyyc added this pull request to the merge queue Mar 24, 2026
Merged via the queue into main with commit d7444e5 Mar 24, 2026
27 checks passed
@msyyc msyyc deleted the copilot/optimize-docstring-api-version branch March 24, 2026 15:43
msyyc added a commit that referenced this pull request Apr 1, 2026
…0105)

- [x] Fix: Remove "and None" from known values in api_version docstring
in `parameter.py`
- [x] Add changelog entry under `.chronus/changes`
- [x] Manually verify the fix works correctly for both api_version and
non-api_version parameters
- [x] Run existing unit tests (all pass)
- [x] Code review passed (no issues)
- [x] Security scan passed (no alerts)

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>[python] optimize docstring about api_version in
generated SDK</issue_title>
> <issue_description>Bot's review comment makes sense
Azure/azure-sdk-for-python#45814 (comment):
> 
> <img width="1128" height="680" alt="Image"
src="https://github.com/user-attachments/assets/65b197ce-5a64-40b0-b923-f7d8b5e84928"
/></issue_description>
> 
> ## Comments on the Issue (you are @copilot in this section)
> 
> <comments>
> </comments>
> 


</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes #10104

<!-- START COPILOT CODING AGENT TIPS -->
---

📱 Kick off Copilot coding agent tasks wherever you are with [GitHub
Mobile](https://gh.io/cca-mobile-docs), available on iOS and Android.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Co-authored-by: Yuchao Yan <yuchaoyan@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:client:python Issue for the Python client emitter: @typespec/http-client-python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[python] optimize docstring about api_version in generated SDK

4 participants