Skip to content

Commit 152f8a8

Browse files
committed
fix typing and docs for initial_response parameter of LROPoller
1 parent 3a05ac7 commit 152f8a8

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

sdk/core/azure-core/azure/core/polling/_async_poller.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ async def async_poller(client, initial_response, deserialization_callback, polli
8484
:param client: A pipeline service client.
8585
:type client: ~azure.core.PipelineClient
8686
:param initial_response: The initial call response
87-
:type initial_response: ~azure.core.pipeline.transport.AsyncHttpResponse
87+
:type initial_response: ~azure.core.pipeline.PipelineResponse
8888
:param deserialization_callback: A callback that takes a Response and return a deserialized object.
8989
If a subclass of Model is given, this passes "deserialize" as callback.
9090
:type deserialization_callback: callable or msrest.serialization.Model
@@ -101,8 +101,7 @@ class AsyncLROPoller(Awaitable, Generic[PollingReturnType]):
101101
:param client: A pipeline service client
102102
:type client: ~azure.core.PipelineClient
103103
:param initial_response: The initial call response
104-
:type initial_response:
105-
~azure.core.pipeline.transport.HttpResponse or ~azure.core.pipeline.transport.AsyncHttpResponse
104+
:type initial_response: ~azure.core.pipeline.PipelineResponse
106105
:param deserialization_callback: A callback that takes a Response and return a deserialized object.
107106
If a subclass of Model is given, this passes "deserialize" as callback.
108107
:type deserialization_callback: callable or msrest.serialization.Model

sdk/core/azure-core/azure/core/polling/_poller.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,7 @@ class LROPoller(Generic[PollingReturnType]):
140140
:param client: A pipeline service client
141141
:type client: ~azure.core.PipelineClient
142142
:param initial_response: The initial call response
143-
:type initial_response:
144-
~azure.core.pipeline.transport.HttpResponse or ~azure.core.pipeline.transport.AsyncHttpResponse
143+
:type initial_response: ~azure.core.pipeline.PipelineResponse
145144
:param deserialization_callback: A callback that takes a Response and return a deserialized object.
146145
If a subclass of Model is given, this passes "deserialize" as callback.
147146
:type deserialization_callback: callable or msrest.serialization.Model
@@ -150,7 +149,7 @@ class LROPoller(Generic[PollingReturnType]):
150149
"""
151150

152151
def __init__(self, client, initial_response, deserialization_callback, polling_method):
153-
# type: (Any, HttpResponse, Callable, PollingMethod[PollingReturnType]) -> None
152+
# type: (Any, Any, Callable, PollingMethod[PollingReturnType]) -> None
154153
self._callbacks = [] # type: List[Callable]
155154
self._polling_method = polling_method
156155

0 commit comments

Comments
 (0)