Skip to content

Commit 8935901

Browse files
docstring feedback from service team (Azure#20955)
1 parent 99d52a5 commit 8935901

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_document_model_administration_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ def begin_build_model(self, source, **kwargs):
9292
"""Build a custom model.
9393
9494
The request must include a `source` parameter that is an
95-
externally accessible Azure storage blob container URI (preferably a Shared Access Signature URI). Note that
96-
a container URI (without SAS) is accepted only when the container is public.
95+
externally accessible Azure storage blob container URI (preferably a Shared Access Signature URI).
9796
Models are built using documents that are of the following content type - 'application/pdf',
9897
'image/jpeg', 'image/png', 'image/tiff', or 'image/bmp'. Other types of content in the container is ignored.
9998
@@ -104,6 +103,7 @@ def begin_build_model(self, source, **kwargs):
104103
:keyword str description: An optional description to add to the model.
105104
:keyword str prefix: A case-sensitive prefix string to filter documents in the source path.
106105
For example, when using an Azure storage blob URI, use the prefix to restrict sub folders.
106+
`prefix` should end in '/' to avoid cases where filenames share the same prefix.
107107
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
108108
:return: An instance of an DocumentModelAdministrationLROPoller. Call `result()` on the poller
109109
object to return a :class:`~azure.ai.formrecognizer.DocumentModel`.
@@ -206,7 +206,7 @@ def _compose_callback(
206206
component_models=[
207207
self._generated_models.ComponentModelInfo(model_id=model_id)
208208
for model_id in model_ids
209-
] if model_ids else None
209+
] if model_ids else []
210210
),
211211
cls=kwargs.pop("cls", _compose_callback),
212212
polling=LROBasePolling(

sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_document_model_administration_client_async.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,7 @@ async def begin_build_model(
100100
"""Build a custom model.
101101
102102
The request must include a `source` parameter that is an
103-
externally accessible Azure storage blob container URI (preferably a Shared Access Signature URI). Note that
104-
a container URI (without SAS) is accepted only when the container is public.
103+
externally accessible Azure storage blob container URI (preferably a Shared Access Signature URI).
105104
Models are built using documents that are of the following content type - 'application/pdf',
106105
'image/jpeg', 'image/png', 'image/tiff', or 'image/bmp'. Other types of content in the container is ignored.
107106
@@ -112,6 +111,7 @@ async def begin_build_model(
112111
:keyword str description: An optional description to add to the model.
113112
:keyword str prefix: A case-sensitive prefix string to filter documents in the source path.
114113
For example, when using an Azure storage blob URI, use the prefix to restrict sub folders.
114+
`prefix` should end in '/' to avoid cases where filenames share the same prefix.
115115
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
116116
:return: An instance of an AsyncDocumentModelAdministrationLROPoller. Call `result()` on the poller
117117
object to return a :class:`~azure.ai.formrecognizer.DocumentModel`.
@@ -214,7 +214,7 @@ def _compose_callback(
214214
component_models=[
215215
self._generated_models.ComponentModelInfo(model_id=model_id)
216216
for model_id in model_ids
217-
] if model_ids else None
217+
] if model_ids else []
218218
),
219219
cls=kwargs.pop("cls", _compose_callback),
220220
polling=AsyncLROBasePolling(

0 commit comments

Comments
 (0)