Skip to content

Commit

Permalink
CodeGen from PR 30716 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 382906dcad808a340f8d96a990e461b1374f9506 into 1736812b284437b88286035449806283f5d87e73
  • Loading branch information
SDKAuto committed Sep 30, 2024
1 parent a88c145 commit 84d5505
Show file tree
Hide file tree
Showing 37 changed files with 1,836 additions and 3,824 deletions.
6 changes: 6 additions & 0 deletions sdk/translation/azure-ai-translation-document/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"commit": "0e474af393dfb7777166c3fceb27a7bbcf0ab5ed",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"typespec_src": "specification/translation/Azure.AI.DocumentTranslation",
"@azure-tools/typespec-python": "0.33.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,23 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._patch import DocumentTranslationClient
from ._client import DocumentTranslationClient
from ._client import SingleDocumentTranslationClient
from ._version import VERSION

__version__ = VERSION


from ._patch import DocumentTranslationApiVersion
from ._patch import DocumentTranslationLROPoller
from ._patch import TranslationGlossary
from ._patch import TranslationTarget
from ._patch import DocumentTranslationInput
from ._patch import TranslationStatus
from ._patch import DocumentStatus
from ._patch import DocumentTranslationError
from ._patch import DocumentTranslationFileFormat
from ._patch import StorageInputType
try:
from ._patch import __all__ as _patch_all
from ._patch import * # pylint: disable=unused-wildcard-import
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk

__all__ = [
"DocumentTranslationApiVersion",
"DocumentTranslationLROPoller",
"TranslationGlossary",
"TranslationTarget",
"DocumentTranslationInput",
"TranslationStatus",
"DocumentStatus",
"DocumentTranslationError",
"DocumentTranslationFileFormat",
"StorageInputType",
"DocumentTranslationClient",
"SingleDocumentTranslationClient",
]

__all__.extend([p for p in _patch_all if p not in __all__])

_patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from copy import deepcopy
from typing import Any, TYPE_CHECKING, Union
from typing_extensions import Self

from azure.core import PipelineClient
from azure.core.credentials import AzureKeyCredential
Expand Down Expand Up @@ -97,7 +98,7 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
def close(self) -> None:
self._client.close()

def __enter__(self) -> "DocumentTranslationClient":
def __enter__(self) -> Self:
self._client.__enter__()
return self

Expand Down Expand Up @@ -177,7 +178,7 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
def close(self) -> None:
self._client.close()

def __enter__(self) -> "SingleDocumentTranslationClient":
def __enter__(self) -> Self:
self._client.__enter__()
return self

Expand Down
Loading

0 comments on commit 84d5505

Please sign in to comment.