Skip to content

Commit 276574e

Browse files
author
SDKAuto
committed
CodeGen from PR 31420 in Azure/azure-rest-api-specs
Merge 765e37c9166862394851ca8ca163d35ff85645c3 into 0410d404c68289cb1737d06bba92133bb84b515c
1 parent 722cf59 commit 276574e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1864
-1694
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"commit": "ad3000cb1377aaf2556700bc5a40dd771ac1ce09",
3+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4+
"typespec_src": "specification/ai/DocumentIntelligence",
5+
"@azure-tools/typespec-python": "0.36.1"
6+
}

sdk/documentintelligence/azure-ai-documentintelligence/azure/ai/documentintelligence/__init__.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,30 @@
55
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
8+
# pylint: disable=wrong-import-position
89

9-
from ._patch import DocumentIntelligenceClient
10-
from ._patch import DocumentIntelligenceAdministrationClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._client import DocumentIntelligenceClient # type: ignore
16+
from ._client import DocumentIntelligenceAdministrationClient # type: ignore
1117
from ._version import VERSION
1218

1319
__version__ = VERSION
1420

15-
16-
from ._patch import AnalyzeDocumentLROPoller
21+
try:
22+
from ._patch import __all__ as _patch_all
23+
from ._patch import *
24+
except ImportError:
25+
_patch_all = []
1726
from ._patch import patch_sdk as _patch_sdk
1827

1928
__all__ = [
20-
"AnalyzeDocumentLROPoller",
2129
"DocumentIntelligenceClient",
2230
"DocumentIntelligenceAdministrationClient",
2331
]
32+
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
2433

2534
_patch_sdk()

sdk/documentintelligence/azure-ai-documentintelligence/azure/ai/documentintelligence/_model_base.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Licensed under the MIT License. See License.txt in the project root for
66
# license information.
77
# --------------------------------------------------------------------------
8-
# pylint: disable=protected-access, arguments-differ, signature-differs, broad-except, too-many-lines
8+
# pylint: disable=protected-access, broad-except
99

1010
import copy
1111
import calendar
@@ -574,7 +574,7 @@ def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None:
574574
def copy(self) -> "Model":
575575
return Model(self.__dict__)
576576

577-
def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: # pylint: disable=unused-argument
577+
def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self:
578578
if f"{cls.__module__}.{cls.__qualname__}" not in cls._calculated:
579579
# we know the last nine classes in mro are going to be 'Model', '_MyMutableMapping', 'MutableMapping',
580580
# 'Mapping', 'Collection', 'Sized', 'Iterable', 'Container' and 'object'
@@ -585,8 +585,8 @@ def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: # pylint: di
585585
annotations = {
586586
k: v
587587
for mro_class in mros
588-
if hasattr(mro_class, "__annotations__") # pylint: disable=no-member
589-
for k, v in mro_class.__annotations__.items() # pylint: disable=no-member
588+
if hasattr(mro_class, "__annotations__")
589+
for k, v in mro_class.__annotations__.items()
590590
}
591591
for attr, rf in attr_to_rest_field.items():
592592
rf._module = cls.__module__
@@ -601,8 +601,8 @@ def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: # pylint: di
601601

602602
def __init_subclass__(cls, discriminator: typing.Optional[str] = None) -> None:
603603
for base in cls.__bases__:
604-
if hasattr(base, "__mapping__"): # pylint: disable=no-member
605-
base.__mapping__[discriminator or cls.__name__] = cls # type: ignore # pylint: disable=no-member
604+
if hasattr(base, "__mapping__"):
605+
base.__mapping__[discriminator or cls.__name__] = cls # type: ignore
606606

607607
@classmethod
608608
def _get_discriminator(cls, exist_discriminators) -> typing.Optional["_RestField"]:
@@ -613,7 +613,7 @@ def _get_discriminator(cls, exist_discriminators) -> typing.Optional["_RestField
613613

614614
@classmethod
615615
def _deserialize(cls, data, exist_discriminators):
616-
if not hasattr(cls, "__mapping__"): # pylint: disable=no-member
616+
if not hasattr(cls, "__mapping__"):
617617
return cls(data)
618618
discriminator = cls._get_discriminator(exist_discriminators)
619619
if discriminator is None:
@@ -633,7 +633,7 @@ def _deserialize(cls, data, exist_discriminators):
633633
discriminator_value = data.find(xml_name).text # pyright: ignore
634634
else:
635635
discriminator_value = data.get(discriminator._rest_name)
636-
mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member
636+
mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore
637637
return mapped_cls._deserialize(data, exist_discriminators)
638638

639639
def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]:

sdk/documentintelligence/azure-ai-documentintelligence/azure/ai/documentintelligence/_operations/__init__.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,23 @@
55
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
8+
# pylint: disable=wrong-import-position
89

9-
from ._patch import DocumentIntelligenceClientOperationsMixin
10-
from ._patch import DocumentIntelligenceAdministrationClientOperationsMixin
10+
from typing import TYPE_CHECKING
1111

12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
1214

15+
from ._operations import DocumentIntelligenceClientOperationsMixin # type: ignore
16+
from ._operations import DocumentIntelligenceAdministrationClientOperationsMixin # type: ignore
17+
18+
from ._patch import __all__ as _patch_all
19+
from ._patch import *
1320
from ._patch import patch_sdk as _patch_sdk
1421

1522
__all__ = [
1623
"DocumentIntelligenceClientOperationsMixin",
1724
"DocumentIntelligenceAdministrationClientOperationsMixin",
1825
]
26+
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
1927
_patch_sdk()

sdk/documentintelligence/azure-ai-documentintelligence/azure/ai/documentintelligence/_operations/_operations.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ def begin_analyze_document(
747747
:type model_id: str
748748
:param analyze_request: Analyze request parameters. Default value is None.
749749
:type analyze_request: ~azure.ai.documentintelligence.models.AnalyzeDocumentRequest
750-
:keyword pages: Range of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
750+
:keyword pages: List of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
751751
None.
752752
:paramtype pages: str
753753
:keyword locale: Locale hint for text recognition and document analysis. Value may contain
@@ -799,7 +799,7 @@ def begin_analyze_document(
799799
:type model_id: str
800800
:param analyze_request: Analyze request parameters. Default value is None.
801801
:type analyze_request: JSON
802-
:keyword pages: Range of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
802+
:keyword pages: List of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
803803
None.
804804
:paramtype pages: str
805805
:keyword locale: Locale hint for text recognition and document analysis. Value may contain
@@ -851,7 +851,7 @@ def begin_analyze_document(
851851
:type model_id: str
852852
:param analyze_request: Analyze request parameters. Default value is None.
853853
:type analyze_request: IO[bytes]
854-
:keyword pages: Range of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
854+
:keyword pages: List of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
855855
None.
856856
:paramtype pages: str
857857
:keyword locale: Locale hint for text recognition and document analysis. Value may contain
@@ -904,7 +904,7 @@ def begin_analyze_document(
904904
AnalyzeDocumentRequest, JSON, IO[bytes] Default value is None.
905905
:type analyze_request: ~azure.ai.documentintelligence.models.AnalyzeDocumentRequest or JSON or
906906
IO[bytes]
907-
:keyword pages: Range of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
907+
:keyword pages: List of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
908908
None.
909909
:paramtype pages: str
910910
:keyword locale: Locale hint for text recognition and document analysis. Value may contain
@@ -1101,7 +1101,7 @@ def begin_analyze_batch_documents(
11011101
:type model_id: str
11021102
:param analyze_batch_request: Analyze batch request parameters. Default value is None.
11031103
:type analyze_batch_request: ~azure.ai.documentintelligence.models.AnalyzeBatchDocumentsRequest
1104-
:keyword pages: Range of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
1104+
:keyword pages: List of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
11051105
None.
11061106
:paramtype pages: str
11071107
:keyword locale: Locale hint for text recognition and document analysis. Value may contain
@@ -1153,7 +1153,7 @@ def begin_analyze_batch_documents(
11531153
:type model_id: str
11541154
:param analyze_batch_request: Analyze batch request parameters. Default value is None.
11551155
:type analyze_batch_request: JSON
1156-
:keyword pages: Range of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
1156+
:keyword pages: List of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
11571157
None.
11581158
:paramtype pages: str
11591159
:keyword locale: Locale hint for text recognition and document analysis. Value may contain
@@ -1205,7 +1205,7 @@ def begin_analyze_batch_documents(
12051205
:type model_id: str
12061206
:param analyze_batch_request: Analyze batch request parameters. Default value is None.
12071207
:type analyze_batch_request: IO[bytes]
1208-
:keyword pages: Range of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
1208+
:keyword pages: List of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
12091209
None.
12101210
:paramtype pages: str
12111211
:keyword locale: Locale hint for text recognition and document analysis. Value may contain
@@ -1258,7 +1258,7 @@ def begin_analyze_batch_documents(
12581258
AnalyzeBatchDocumentsRequest, JSON, IO[bytes] Default value is None.
12591259
:type analyze_batch_request: ~azure.ai.documentintelligence.models.AnalyzeBatchDocumentsRequest
12601260
or JSON or IO[bytes]
1261-
:keyword pages: Range of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
1261+
:keyword pages: List of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
12621262
None.
12631263
:paramtype pages: str
12641264
:keyword locale: Locale hint for text recognition and document analysis. Value may contain
@@ -1579,7 +1579,7 @@ def begin_classify_document(
15791579
:keyword split: Document splitting mode. Known values are: "auto", "none", and "perPage".
15801580
Default value is None.
15811581
:paramtype split: str or ~azure.ai.documentintelligence.models.SplitMode
1582-
:keyword pages: Range of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
1582+
:keyword pages: List of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
15831583
None.
15841584
:paramtype pages: str
15851585
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
@@ -1615,7 +1615,7 @@ def begin_classify_document(
16151615
:keyword split: Document splitting mode. Known values are: "auto", "none", and "perPage".
16161616
Default value is None.
16171617
:paramtype split: str or ~azure.ai.documentintelligence.models.SplitMode
1618-
:keyword pages: Range of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
1618+
:keyword pages: List of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
16191619
None.
16201620
:paramtype pages: str
16211621
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
@@ -1651,7 +1651,7 @@ def begin_classify_document(
16511651
:keyword split: Document splitting mode. Known values are: "auto", "none", and "perPage".
16521652
Default value is None.
16531653
:paramtype split: str or ~azure.ai.documentintelligence.models.SplitMode
1654-
:keyword pages: Range of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
1654+
:keyword pages: List of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
16551655
None.
16561656
:paramtype pages: str
16571657
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
@@ -1688,7 +1688,7 @@ def begin_classify_document(
16881688
:keyword split: Document splitting mode. Known values are: "auto", "none", and "perPage".
16891689
Default value is None.
16901690
:paramtype split: str or ~azure.ai.documentintelligence.models.SplitMode
1691-
:keyword pages: Range of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
1691+
:keyword pages: List of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
16921692
None.
16931693
:paramtype pages: str
16941694
:return: An instance of LROPoller that returns AnalyzeResult. The AnalyzeResult is compatible

0 commit comments

Comments
 (0)