[python] fix incorrect padding of wire key name in splatted body method signature#10326
Merged
iscai-msft merged 1 commit intomicrosoft:mainfrom Apr 9, 2026
Merged
Conversation
dargilco
approved these changes
Apr 9, 2026
commit: |
Member
Author
|
repro generation: def search(
self,
name: str,
body: Union[JSON, IO[bytes]] = _Unset,
*,
scope: str = _Unset,
items: Optional[list[_models.InputItem]] = None,
previous_search_id: Optional[str] = None,
options: Optional[_models.SearchOptions] = None,
**kwargs: Any
) -> _models.SearchResult:
"""search.
:param name: Required.
:type name: str
:param body: Is either a JSON type or a IO[bytes] type. Required.
:type body: JSON or IO[bytes]
:keyword scope: Required.
:paramtype scope: str
:keyword items: Default value is None.
:paramtype items: list[~itemstest.models.InputItem]
:keyword previous_search_id: Default value is None.
:paramtype previous_search_id: str
:keyword options: Default value is None.
:paramtype options: ~itemstest.models.SearchOptions
:return: SearchResult. The SearchResult is compatible with MutableMapping
:rtype: ~itemstest.models.SearchResult
:raises ~corehttp.exceptions.HttpResponseError:
"""
error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
}
error_map.update(kwargs.pop("error_map", {}) or {})
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = kwargs.pop("params", {}) or {}
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.SearchResult] = kwargs.pop("cls", None)
if body is _Unset:
if scope is _Unset:
raise TypeError("missing required argument: scope")
body = {"items": items, "options": options, "previous_search_id": previous_search_id, "scope": scope}
body = {k: v for k, v in body.items() if v is not None}
content_type = content_type or "application/json" |
Contributor
|
All changed packages have been documented.
Show changes
|
Collaborator
|
You can try these changes here
|
timotheeguerin
approved these changes
Apr 9, 2026
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.
fixes #10247