From 8935901f8728cacfb9348949861ce629f1b20bde Mon Sep 17 00:00:00 2001 From: Krista Pratico Date: Wed, 29 Sep 2021 17:18:41 -0700 Subject: [PATCH] docstring feedback from service team (#20955) --- .../formrecognizer/_document_model_administration_client.py | 6 +++--- .../aio/_document_model_administration_client_async.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_document_model_administration_client.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_document_model_administration_client.py index 40d73e19a9f1..430586bf50c2 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_document_model_administration_client.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_document_model_administration_client.py @@ -92,8 +92,7 @@ def begin_build_model(self, source, **kwargs): """Build a custom model. The request must include a `source` parameter that is an - externally accessible Azure storage blob container URI (preferably a Shared Access Signature URI). Note that - a container URI (without SAS) is accepted only when the container is public. + externally accessible Azure storage blob container URI (preferably a Shared Access Signature URI). Models are built using documents that are of the following content type - 'application/pdf', 'image/jpeg', 'image/png', 'image/tiff', or 'image/bmp'. Other types of content in the container is ignored. @@ -104,6 +103,7 @@ def begin_build_model(self, source, **kwargs): :keyword str description: An optional description to add to the model. :keyword str prefix: A case-sensitive prefix string to filter documents in the source path. For example, when using an Azure storage blob URI, use the prefix to restrict sub folders. + `prefix` should end in '/' to avoid cases where filenames share the same prefix. :keyword str continuation_token: A continuation token to restart a poller from a saved state. :return: An instance of an DocumentModelAdministrationLROPoller. Call `result()` on the poller object to return a :class:`~azure.ai.formrecognizer.DocumentModel`. @@ -206,7 +206,7 @@ def _compose_callback( component_models=[ self._generated_models.ComponentModelInfo(model_id=model_id) for model_id in model_ids - ] if model_ids else None + ] if model_ids else [] ), cls=kwargs.pop("cls", _compose_callback), polling=LROBasePolling( diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_document_model_administration_client_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_document_model_administration_client_async.py index a4ea69171653..f7aa183054b0 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_document_model_administration_client_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_document_model_administration_client_async.py @@ -100,8 +100,7 @@ async def begin_build_model( """Build a custom model. The request must include a `source` parameter that is an - externally accessible Azure storage blob container URI (preferably a Shared Access Signature URI). Note that - a container URI (without SAS) is accepted only when the container is public. + externally accessible Azure storage blob container URI (preferably a Shared Access Signature URI). Models are built using documents that are of the following content type - 'application/pdf', 'image/jpeg', 'image/png', 'image/tiff', or 'image/bmp'. Other types of content in the container is ignored. @@ -112,6 +111,7 @@ async def begin_build_model( :keyword str description: An optional description to add to the model. :keyword str prefix: A case-sensitive prefix string to filter documents in the source path. For example, when using an Azure storage blob URI, use the prefix to restrict sub folders. + `prefix` should end in '/' to avoid cases where filenames share the same prefix. :keyword str continuation_token: A continuation token to restart a poller from a saved state. :return: An instance of an AsyncDocumentModelAdministrationLROPoller. Call `result()` on the poller object to return a :class:`~azure.ai.formrecognizer.DocumentModel`. @@ -214,7 +214,7 @@ def _compose_callback( component_models=[ self._generated_models.ComponentModelInfo(model_id=model_id) for model_id in model_ids - ] if model_ids else None + ] if model_ids else [] ), cls=kwargs.pop("cls", _compose_callback), polling=AsyncLROBasePolling(