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
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"commit": "ad3000cb1377aaf2556700bc5a40dd771ac1ce09",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"typespec_src": "specification/ai/DocumentIntelligence",
"@azure-tools/typespec-python": "0.36.1"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,30 @@
# Code generated by Microsoft (R) Python Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
# pylint: disable=wrong-import-position

from ._patch import DocumentIntelligenceClient
from ._patch import DocumentIntelligenceAdministrationClient
from typing import TYPE_CHECKING

if TYPE_CHECKING:
from ._patch import * # pylint: disable=unused-wildcard-import

from ._client import DocumentIntelligenceClient # type: ignore
from ._client import DocumentIntelligenceAdministrationClient # type: ignore
from ._version import VERSION

__version__ = VERSION


from ._patch import AnalyzeDocumentLROPoller
try:
from ._patch import __all__ as _patch_all
from ._patch import *
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk

__all__ = [
"AnalyzeDocumentLROPoller",
"DocumentIntelligenceClient",
"DocumentIntelligenceAdministrationClient",
]
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore

_patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
# pylint: disable=protected-access, arguments-differ, signature-differs, broad-except, too-many-lines
# pylint: disable=protected-access, broad-except

import copy
import calendar
Expand Down Expand Up @@ -574,7 +574,7 @@ def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None:
def copy(self) -> "Model":
return Model(self.__dict__)

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

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

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

@classmethod
def _deserialize(cls, data, exist_discriminators):
if not hasattr(cls, "__mapping__"): # pylint: disable=no-member
if not hasattr(cls, "__mapping__"):
return cls(data)
discriminator = cls._get_discriminator(exist_discriminators)
if discriminator is None:
Expand All @@ -633,7 +633,7 @@ def _deserialize(cls, data, exist_discriminators):
discriminator_value = data.find(xml_name).text # pyright: ignore
else:
discriminator_value = data.get(discriminator._rest_name)
mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member
mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore
return mapped_cls._deserialize(data, exist_discriminators)

def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,23 @@
# Code generated by Microsoft (R) Python Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
# pylint: disable=wrong-import-position

from ._patch import DocumentIntelligenceClientOperationsMixin
from ._patch import DocumentIntelligenceAdministrationClientOperationsMixin
from typing import TYPE_CHECKING

if TYPE_CHECKING:
from ._patch import * # pylint: disable=unused-wildcard-import

from ._operations import DocumentIntelligenceClientOperationsMixin # type: ignore
from ._operations import DocumentIntelligenceAdministrationClientOperationsMixin # type: ignore

from ._patch import __all__ as _patch_all
from ._patch import *
from ._patch import patch_sdk as _patch_sdk

__all__ = [
"DocumentIntelligenceClientOperationsMixin",
"DocumentIntelligenceAdministrationClientOperationsMixin",
]
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
_patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ def begin_analyze_document(
:type model_id: str
:param analyze_request: Analyze request parameters. Default value is None.
:type analyze_request: ~azure.ai.documentintelligence.models.AnalyzeDocumentRequest
:keyword pages: Range of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
:keyword pages: List of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
None.
:paramtype pages: str
:keyword locale: Locale hint for text recognition and document analysis. Value may contain
Expand Down Expand Up @@ -799,7 +799,7 @@ def begin_analyze_document(
:type model_id: str
:param analyze_request: Analyze request parameters. Default value is None.
:type analyze_request: JSON
:keyword pages: Range of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
:keyword pages: List of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
None.
:paramtype pages: str
:keyword locale: Locale hint for text recognition and document analysis. Value may contain
Expand Down Expand Up @@ -851,7 +851,7 @@ def begin_analyze_document(
:type model_id: str
:param analyze_request: Analyze request parameters. Default value is None.
:type analyze_request: IO[bytes]
:keyword pages: Range of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
:keyword pages: List of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
None.
:paramtype pages: str
:keyword locale: Locale hint for text recognition and document analysis. Value may contain
Expand Down Expand Up @@ -904,7 +904,7 @@ def begin_analyze_document(
AnalyzeDocumentRequest, JSON, IO[bytes] Default value is None.
:type analyze_request: ~azure.ai.documentintelligence.models.AnalyzeDocumentRequest or JSON or
IO[bytes]
:keyword pages: Range of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
:keyword pages: List of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
None.
:paramtype pages: str
:keyword locale: Locale hint for text recognition and document analysis. Value may contain
Expand Down Expand Up @@ -1101,7 +1101,7 @@ def begin_analyze_batch_documents(
:type model_id: str
:param analyze_batch_request: Analyze batch request parameters. Default value is None.
:type analyze_batch_request: ~azure.ai.documentintelligence.models.AnalyzeBatchDocumentsRequest
:keyword pages: Range of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
:keyword pages: List of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
None.
:paramtype pages: str
:keyword locale: Locale hint for text recognition and document analysis. Value may contain
Expand Down Expand Up @@ -1153,7 +1153,7 @@ def begin_analyze_batch_documents(
:type model_id: str
:param analyze_batch_request: Analyze batch request parameters. Default value is None.
:type analyze_batch_request: JSON
:keyword pages: Range of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
:keyword pages: List of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
None.
:paramtype pages: str
:keyword locale: Locale hint for text recognition and document analysis. Value may contain
Expand Down Expand Up @@ -1205,7 +1205,7 @@ def begin_analyze_batch_documents(
:type model_id: str
:param analyze_batch_request: Analyze batch request parameters. Default value is None.
:type analyze_batch_request: IO[bytes]
:keyword pages: Range of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
:keyword pages: List of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
None.
:paramtype pages: str
:keyword locale: Locale hint for text recognition and document analysis. Value may contain
Expand Down Expand Up @@ -1258,7 +1258,7 @@ def begin_analyze_batch_documents(
AnalyzeBatchDocumentsRequest, JSON, IO[bytes] Default value is None.
:type analyze_batch_request: ~azure.ai.documentintelligence.models.AnalyzeBatchDocumentsRequest
or JSON or IO[bytes]
:keyword pages: Range of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
:keyword pages: List of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
None.
:paramtype pages: str
:keyword locale: Locale hint for text recognition and document analysis. Value may contain
Expand Down Expand Up @@ -1579,7 +1579,7 @@ def begin_classify_document(
:keyword split: Document splitting mode. Known values are: "auto", "none", and "perPage".
Default value is None.
:paramtype split: str or ~azure.ai.documentintelligence.models.SplitMode
:keyword pages: Range of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
:keyword pages: List of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
None.
:paramtype pages: str
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Expand Down Expand Up @@ -1615,7 +1615,7 @@ def begin_classify_document(
:keyword split: Document splitting mode. Known values are: "auto", "none", and "perPage".
Default value is None.
:paramtype split: str or ~azure.ai.documentintelligence.models.SplitMode
:keyword pages: Range of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
:keyword pages: List of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
None.
:paramtype pages: str
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Expand Down Expand Up @@ -1651,7 +1651,7 @@ def begin_classify_document(
:keyword split: Document splitting mode. Known values are: "auto", "none", and "perPage".
Default value is None.
:paramtype split: str or ~azure.ai.documentintelligence.models.SplitMode
:keyword pages: Range of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
:keyword pages: List of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
None.
:paramtype pages: str
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Expand Down Expand Up @@ -1688,7 +1688,7 @@ def begin_classify_document(
:keyword split: Document splitting mode. Known values are: "auto", "none", and "perPage".
Default value is None.
:paramtype split: str or ~azure.ai.documentintelligence.models.SplitMode
:keyword pages: Range of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
:keyword pages: List of 1-based page numbers to analyze. Ex. "1-3,5,7-9". Default value is
None.
:paramtype pages: str
:return: An instance of LROPoller that returns AnalyzeResult. The AnalyzeResult is compatible
Expand Down
Loading