Skip to content

Commit 238a1d6

Browse files
andrewmathew1Andrew Mathew
andauthored
Passing Response Hook to Client Connection (#43288)
* passing response hook to client connection * removing pylint disable --------- Co-authored-by: Andrew Mathew <[email protected]>
1 parent 137bc32 commit 238a1d6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1513,7 +1513,7 @@ async def get_throughput(
15131513
return _deserialize_throughput(throughput=throughput_properties)
15141514

15151515
@distributed_trace_async
1516-
async def replace_throughput( # pylint: disable=unused-argument
1516+
async def replace_throughput(
15171517
self,
15181518
throughput: Union[int, ThroughputProperties],
15191519
*,
@@ -1547,7 +1547,7 @@ async def replace_throughput( # pylint: disable=unused-argument
15471547
new_offer = throughput_properties[0].copy()
15481548
_replace_throughput(throughput=throughput, new_throughput_properties=new_offer)
15491549
data = await self.client_connection.ReplaceOffer(offer_link=throughput_properties[0]["_self"],
1550-
offer=throughput_properties[0], **kwargs)
1550+
offer=throughput_properties[0], response_hook=response_hook, **kwargs)
15511551

15521552
return ThroughputProperties(offer_throughput=data["content"]["offerThroughput"], properties=data)
15531553

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1698,7 +1698,7 @@ def get_throughput(
16981698
return _deserialize_throughput(throughput=throughput_properties)
16991699

17001700
@distributed_trace
1701-
def replace_throughput( # pylint: disable=unused-argument
1701+
def replace_throughput(
17021702
self,
17031703
throughput: Union[int, ThroughputProperties],
17041704
*,
@@ -1730,7 +1730,7 @@ def replace_throughput( # pylint: disable=unused-argument
17301730
new_throughput_properties = throughput_properties[0].copy()
17311731
_replace_throughput(throughput=throughput, new_throughput_properties=new_throughput_properties)
17321732
data = self.client_connection.ReplaceOffer(
1733-
offer_link=throughput_properties[0]["_self"], offer=throughput_properties[0], **kwargs)
1733+
offer_link=throughput_properties[0]["_self"], offer=throughput_properties[0], response_hook=response_hook, **kwargs)
17341734

17351735
return ThroughputProperties(offer_throughput=data["content"]["offerThroughput"], properties=data)
17361736

0 commit comments

Comments
 (0)