Skip to content

Commit 19e06dc

Browse files
authored
[Cosmos] Fix return type to CosmosDict for public APIs (#43254)
* Fix return type to CosmosDict for public APIs * Update description of return values
1 parent c1ad6c6 commit 19e06dc

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_client_connection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2007,7 +2007,7 @@ def ReadConflict(
20072007
conflict_link: str,
20082008
options: Optional[Mapping[str, Any]] = None,
20092009
**kwargs: Any
2010-
) -> Dict[str, Any]:
2010+
) -> CosmosDict:
20112011
"""Reads a conflict.
20122012
20132013
:param str conflict_link:
@@ -2017,7 +2017,7 @@ def ReadConflict(
20172017
:return:
20182018
The read Conflict.
20192019
:rtype:
2020-
dict
2020+
~azure.cosmos.CosmosDict[str, Any]
20212021
20222022
"""
20232023
if options is None:

sdk/cosmos/azure-cosmos/azure/cosmos/aio/_container.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1642,7 +1642,7 @@ async def get_conflict(
16421642
conflict: Union[str, Mapping[str, Any]],
16431643
partition_key: PartitionKeyType,
16441644
**kwargs: Any,
1645-
) -> Dict[str, Any]:
1645+
) -> CosmosDict:
16461646
"""Get the conflict identified by `conflict`.
16471647
16481648
:param conflict: The ID (name) or dict representing the conflict to retrieve.
@@ -1656,8 +1656,8 @@ async def get_conflict(
16561656
:keyword response_hook: A callable invoked with the response metadata.
16571657
:paramtype response_hook: Callable[[Dict[str, str], Dict[str, Any]], None]
16581658
:raises ~azure.cosmos.exceptions.CosmosHttpResponseError: The given conflict couldn't be retrieved.
1659-
:returns: A dict representing the retrieved conflict.
1660-
:rtype: Dict[str, Any]
1659+
:returns: A CosmosDict representing the retrieved conflict.
1660+
:rtype: ~azure.cosmos.CosmosDict[str, Any]
16611661
"""
16621662
request_options = _build_options(kwargs)
16631663
request_options["partitionKey"] = await self._set_partition_key(partition_key)

sdk/cosmos/azure-cosmos/azure/cosmos/aio/_cosmos_client_connection_async.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,7 +1201,7 @@ async def ReadConflict(
12011201
conflict_link: str,
12021202
options: Optional[Mapping[str, Any]] = None,
12031203
**kwargs: Any
1204-
) -> Dict[str, Any]:
1204+
) -> CosmosDict:
12051205
"""Reads a conflict.
12061206
12071207
:param str conflict_link:
@@ -1211,7 +1211,7 @@ async def ReadConflict(
12111211
:return:
12121212
The read Conflict.
12131213
:rtype:
1214-
dict
1214+
~azure.cosmos.CosmosDict[str, Any]
12151215
12161216
"""
12171217
if options is None:

sdk/cosmos/azure-cosmos/azure/cosmos/container.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1828,7 +1828,7 @@ def get_conflict(
18281828
conflict: Union[str, Mapping[str, Any]],
18291829
partition_key: _PartitionKeyType,
18301830
**kwargs: Any
1831-
) -> Dict[str, Any]:
1831+
) -> CosmosDict:
18321832
"""Get the conflict identified by `conflict`.
18331833
18341834
:param conflict: The ID (name) or dict representing the conflict to retrieve.
@@ -1840,9 +1840,9 @@ def get_conflict(
18401840
:type partition_key: Union[str, int, float, bool, Type[NonePartitionKeyValue], Type[NullPartitionKeyValue],
18411841
None, Sequence[Union[str, int, float, bool, None]]]
18421842
:keyword Callable response_hook: A callable invoked with the response metadata.
1843-
:returns: A dict representing the retrieved conflict.
18441843
:raises ~azure.cosmos.exceptions.CosmosHttpResponseError: The given conflict couldn't be retrieved.
1845-
:rtype: Dict[str, Any]
1844+
:returns: A CosmosDict representing the retrieved conflict.
1845+
:rtype: ~azure.cosmos.CosmosDict[str, Any]
18461846
"""
18471847
request_options = build_options(kwargs)
18481848
request_options["partitionKey"] = self._set_partition_key(partition_key)

0 commit comments

Comments
 (0)