Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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": "c29452397f8d29456182b951987a765d1ae01bb1",
"repository_url": "https://github.com/test-repo-billy/azure-rest-api-specs",
"typespec_src": "specification/translation/Azure.AI.DocumentTranslation",
"@azure-tools/typespec-python": "0.31.1"
}
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