Skip to content

Commit dc57ddd

Browse files
remove internal import from doc translation sample (#35708)
1 parent 3930c7c commit dc57ddd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

sdk/translation/azure-ai-translation-document/samples/async_samples/sample_single_document_translation_async.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from azure.core.credentials import AzureKeyCredential
2222
from azure.ai.translation.document.aio import SingleDocumentTranslationClient
2323
from azure.ai.translation.document.models import DocumentTranslateContent
24-
from azure.core.rest._helpers import FileType
24+
2525

2626
async def sample_single_document_translation_async():
2727
# [START synchronous_document_translation_async]
@@ -44,7 +44,7 @@ async def sample_single_document_translation_async():
4444
with open(file_path, "r") as file:
4545
file_contents = file.read()
4646

47-
document_content: FileType = (file_name, file_contents, file_type)
47+
document_content = (file_name, file_contents, file_type)
4848
document_translate_content = DocumentTranslateContent(document=document_content)
4949

5050
async with client:

sdk/translation/azure-ai-translation-document/samples/sample_single_document_translation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from azure.core.credentials import AzureKeyCredential
2222
from azure.ai.translation.document import SingleDocumentTranslationClient
2323
from azure.ai.translation.document.models import DocumentTranslateContent
24-
from azure.core.rest._helpers import FileType
24+
2525

2626
TEST_INPUT_FILE_NAME = os.path.abspath(
2727
os.path.join(os.path.abspath(__file__), "..", "../tests/TestData/test-input.txt")
@@ -41,7 +41,7 @@ def sample_single_document_translation():
4141
with open(TEST_INPUT_FILE_NAME, "r") as file:
4242
file_contents = file.read()
4343

44-
document_content: FileType = (file_name, file_contents, file_type)
44+
document_content = (file_name, file_contents, file_type)
4545
document_translate_content = DocumentTranslateContent(document=document_content)
4646

4747
response_stream = client.document_translate(body=document_translate_content, target_language=target_languages)

0 commit comments

Comments
 (0)