Skip to content

Commit c87abea

Browse files
update docstrings (Azure#25366)
1 parent 71cc3e9 commit c87abea

File tree

3 files changed

+72
-10
lines changed

3 files changed

+72
-10
lines changed

sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_lro.py

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,20 @@ def get_continuation_token(self):
215215

216216
class AnalyzeHealthcareEntitiesLROPoller(LROPoller[PollingReturnType]):
217217
def polling_method(self) -> AnalyzeHealthcareEntitiesLROPollingMethod:
218-
"""Return the polling method associated to this poller."""
218+
"""Return the polling method associated to this poller.
219+
220+
:return: AnalyzeHealthcareEntitiesLROPollingMethod
221+
:rtype: AnalyzeHealthcareEntitiesLROPollingMethod
222+
"""
219223
return self._polling_method # type: ignore
220224

221225
@property
222226
def details(self) -> Mapping[str, Any]:
227+
"""Long-running operation metadata.
228+
229+
:return: A mapping of details about the long-running operation.
230+
:rtype: Mapping[str, Any]
231+
"""
223232
return {
224233
"id": self.polling_method().id,
225234
"created_on": self.polling_method().created_on,
@@ -247,7 +256,14 @@ def from_continuation_token( # type: ignore
247256
continuation_token: str,
248257
**kwargs: Any
249258
) -> "AnalyzeHealthcareEntitiesLROPoller": # type: ignore
250-
"""
259+
"""Internal use only.
260+
261+
:param polling_method: Polling method to use.
262+
:type polling_method: AnalyzeHealthcareEntitiesLROPollingMethod
263+
:param str continuation_token: Opaque token.
264+
:return: AnalyzeHealthcareEntitiesLROPoller
265+
:rtype: AnalyzeHealthcareEntitiesLROPoller
266+
251267
:meta private:
252268
"""
253269
client, initial_response, deserialization_callback = polling_method.from_continuation_token(
@@ -388,11 +404,20 @@ def get_continuation_token(self):
388404

389405
class AnalyzeActionsLROPoller(LROPoller[PollingReturnType]):
390406
def polling_method(self) -> AnalyzeActionsLROPollingMethod:
391-
"""Return the polling method associated to this poller."""
407+
"""Return the polling method associated to this poller.
408+
409+
:return: AnalyzeActionsLROPollingMethod
410+
:rtype: AnalyzeActionsLROPollingMethod
411+
"""
392412
return self._polling_method # type: ignore
393413

394414
@property
395415
def details(self) -> Mapping[str, Any]:
416+
"""Long-running operation metadata.
417+
418+
:return: A mapping of details about the long-running operation.
419+
:rtype: Mapping[str, Any]
420+
"""
396421
return {
397422
"id": self.polling_method().id,
398423
"created_on": self.polling_method().created_on,
@@ -428,7 +453,14 @@ def from_continuation_token( # type: ignore
428453
continuation_token: str,
429454
**kwargs: Any
430455
) -> "AnalyzeActionsLROPoller": # type: ignore
431-
"""
456+
"""Internal use only.
457+
458+
:param polling_method: Polling method to use.
459+
:type polling_method: AnalyzeActionsLROPollingMethod
460+
:param str continuation_token: Opaque token.
461+
:return: AnalyzeActionsLROPoller
462+
:rtype: AnalyzeActionsLROPoller
463+
432464
:meta private:
433465
"""
434466
client, initial_response, deserialization_callback = polling_method.from_continuation_token(

sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,11 @@ def __delitem__(self, key):
3737
self.__dict__[key] = None
3838

3939
def __eq__(self, other):
40-
"""Compare objects by comparing all attributes."""
4140
if isinstance(other, self.__class__):
4241
return self.__dict__ == other.__dict__
4342
return False
4443

4544
def __ne__(self, other):
46-
"""Compare objects by comparing all attributes."""
4745
return not self.__eq__(other)
4846

4947
def __contains__(self, key):

sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_lro_async.py

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,20 @@ def get_continuation_token(self):
185185

186186
class AsyncAnalyzeHealthcareEntitiesLROPoller(AsyncLROPoller[PollingReturnType]):
187187
def polling_method(self) -> AsyncAnalyzeHealthcareEntitiesLROPollingMethod: # type: ignore
188-
"""Return the polling method associated to this poller."""
188+
"""Return the polling method associated to this poller.
189+
190+
:return: AsyncAnalyzeHealthcareEntitiesLROPollingMethod
191+
:rtype: AsyncAnalyzeHealthcareEntitiesLROPollingMethod
192+
"""
189193
return self._polling_method # type: ignore
190194

191195
@property
192196
def details(self) -> Mapping[str, Any]:
197+
"""Long-running operation metadata.
198+
199+
:return: A mapping of details about the long-running operation.
200+
:rtype: Mapping[str, Any]
201+
"""
193202
return {
194203
"id": self.polling_method().id,
195204
"created_on": self.polling_method().created_on,
@@ -217,7 +226,14 @@ def from_continuation_token( # type: ignore
217226
continuation_token: str,
218227
**kwargs: Any
219228
) -> "AsyncAnalyzeHealthcareEntitiesLROPoller":
220-
"""
229+
"""Internal use only.
230+
231+
:param polling_method: Polling method to use.
232+
:type polling_method: AsyncAnalyzeHealthcareEntitiesLROPollingMethod
233+
:param str continuation_token: Opaque token.
234+
:return: AsyncAnalyzeHealthcareEntitiesLROPoller
235+
:rtype: AsyncAnalyzeHealthcareEntitiesLROPoller
236+
221237
:meta private:
222238
"""
223239
client, initial_response, deserialization_callback = polling_method.from_continuation_token(
@@ -355,11 +371,20 @@ def get_continuation_token(self):
355371

356372
class AsyncAnalyzeActionsLROPoller(AsyncLROPoller[PollingReturnType]):
357373
def polling_method(self) -> AsyncAnalyzeActionsLROPollingMethod: # type: ignore
358-
"""Return the polling method associated to this poller."""
374+
"""Return the polling method associated to this poller.
375+
376+
:return: AsyncAnalyzeActionsLROPollingMethod
377+
:rtype: AsyncAnalyzeActionsLROPollingMethod
378+
"""
359379
return self._polling_method # type: ignore
360380

361381
@property
362382
def details(self) -> Mapping[str, Any]:
383+
"""Long-running operation metadata.
384+
385+
:return: A mapping of details about the long-running operation.
386+
:rtype: Mapping[str, Any]
387+
"""
363388
return {
364389
"id": self.polling_method().id,
365390
"created_on": self.polling_method().created_on,
@@ -395,7 +420,14 @@ def from_continuation_token( # type: ignore
395420
continuation_token: str,
396421
**kwargs: Any
397422
) -> "AsyncAnalyzeActionsLROPoller": # type: ignore
398-
"""
423+
"""Internal use only.
424+
425+
:param polling_method: Polling method to use.
426+
:type polling_method: AsyncAnalyzeActionsLROPollingMethod
427+
:param str continuation_token: Opaque token.
428+
:return: AsyncAnalyzeActionsLROPoller
429+
:rtype: AsyncAnalyzeActionsLROPoller
430+
399431
:meta private:
400432
"""
401433
client, initial_response, deserialization_callback = polling_method.from_continuation_token(

0 commit comments

Comments
 (0)