Skip to content

Commit

Permalink
add type hints to overload impl (#24406)
Browse files Browse the repository at this point in the history
  • Loading branch information
kristapratico authored May 13, 2022
1 parent f938bb1 commit ad5da24
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion sdk/translation/azure-ai-translation-document/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release History

## 1.0.0b7 (Unreleased)
## 1.0.0 (Unreleased)

### Features Added

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def begin_translation(
category_id: Optional[str] = None,
glossaries: Optional[List[TranslationGlossary]] = None,
**kwargs: Any
) -> DocumentTranslationLROPoller[ItemPaged[DocumentStatus]]: # type: ignore
) -> DocumentTranslationLROPoller[ItemPaged[DocumentStatus]]:
"""Begin translating the document(s) in your source container to your target container
in the given language. There are two ways to call this method:
Expand Down Expand Up @@ -164,7 +164,7 @@ def begin_translation(
@overload
def begin_translation(
self, inputs: List[DocumentTranslationInput], **kwargs: Any
) -> DocumentTranslationLROPoller[ItemPaged[DocumentStatus]]: # type: ignore
) -> DocumentTranslationLROPoller[ItemPaged[DocumentStatus]]:
"""Begin translating the document(s) in your source container to your target container
in the given language. There are two ways to call this method:
Expand All @@ -190,8 +190,8 @@ def begin_translation(

@distributed_trace
def begin_translation(
self, *args, **kwargs
): # pylint: disable=client-method-missing-type-annotations
self, *args: Union[str, List[DocumentTranslationInput]], **kwargs: Any
) -> DocumentTranslationLROPoller[ItemPaged[DocumentStatus]]:
"""Begin translating the document(s) in your source container to your target container
in the given language. There are two ways to call this method:
Expand Down Expand Up @@ -273,7 +273,7 @@ def deserialization_callback(
)

callback = kwargs.pop("cls", deserialization_callback)
return self._client.document_translation.begin_start_translation(
return self._client.document_translation.begin_start_translation( # type: ignore
inputs=inputs if not continuation_token else None,
polling=DocumentTranslationLROPollingMethod(
timeout=polling_interval,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# Licensed under the MIT License.
# ------------------------------------

VERSION = "1.0.0b7"
VERSION = "1.0.0"
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ async def begin_translation(

@distributed_trace_async
async def begin_translation(
self, *args, **kwargs
): # pylint: disable=client-method-missing-type-annotations
self, *args: Union[str, List[DocumentTranslationInput]], **kwargs: Any
) -> AsyncDocumentTranslationLROPoller[AsyncItemPaged[DocumentStatus]]:
"""Begin translating the document(s) in your source container to your target container
in the given language. There are two ways to call this method:
Expand Down Expand Up @@ -279,7 +279,7 @@ def deserialization_callback(
)

callback = kwargs.pop("cls", deserialization_callback)
return await self._client.document_translation.begin_start_translation(
return await self._client.document_translation.begin_start_translation( # type: ignore
inputs=inputs if not continuation_token else None,
polling=AsyncDocumentTranslationLROPollingMethod(
timeout=polling_interval,
Expand Down

0 comments on commit ad5da24

Please sign in to comment.