Skip to content

Commit a19799d

Browse files
author
SDKAuto
committed
CodeGen from PR 32705 in Azure/azure-rest-api-specs
Merge 66f3f5a1184215abf25d93f185b55dfbc75b0050 into 53d9b54ab9c016bf6866057c8e3ac923ceb073d4
1 parent f6dfb64 commit a19799d

38 files changed

+1389
-11602
lines changed

sdk/ai/azure-ai-projects/MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ include azure/ai/projects/py.typed
44
recursive-include tests *.py
55
recursive-include samples *.py *.md
66
include azure/__init__.py
7-
include azure/ai/__init__.py
7+
include azure/ai/__init__.py

sdk/ai/azure-ai-projects/_meta.json

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

sdk/ai/azure-ai-projects/apiview-properties.json

Lines changed: 274 additions & 0 deletions
Large diffs are not rendered by default.

sdk/ai/azure-ai-projects/azure/ai/projects/_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ class AIProjectClient:
3636
:vartype evaluations: azure.ai.projects.operations.EvaluationsOperations
3737
:param endpoint: The Azure AI Foundry project endpoint, in the form
3838
``https://<azure-region>.api.azureml.ms`` or
39-
``https://<private-link-guid>.<azure-region>.api.azureml.ms``\\\\ , where
40-
:code:`<azure-region>` is the Azure region where the project is deployed (e.g. westus) and
41-
:code:`<private-link-guid>` is the GUID of the Enterprise private link. Required.
39+
``https://<private-link-guid>.<azure-region>.api.azureml.ms``, where <azure-region> is the
40+
Azure region where the project is deployed (e.g. westus) and <private-link-guid> is the GUID of
41+
the Enterprise private link. Required.
4242
:type endpoint: str
4343
:param subscription_id: The Azure subscription ID. Required.
4444
:type subscription_id: str

sdk/ai/azure-ai-projects/azure/ai/projects/_configuration.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ class AIProjectClientConfiguration: # pylint: disable=too-many-instance-attribu
2424
2525
:param endpoint: The Azure AI Foundry project endpoint, in the form
2626
``https://<azure-region>.api.azureml.ms`` or
27-
``https://<private-link-guid>.<azure-region>.api.azureml.ms``\\ , where :code:`<azure-region>`
28-
is the Azure region where the project is deployed (e.g. westus) and :code:`<private-link-guid>`
29-
is the GUID of the Enterprise private link. Required.
27+
``https://<private-link-guid>.<azure-region>.api.azureml.ms``, where <azure-region> is the
28+
Azure region where the project is deployed (e.g. westus) and <private-link-guid> is the GUID of
29+
the Enterprise private link. Required.
3030
:type endpoint: str
3131
:param subscription_id: The Azure subscription ID. Required.
3232
:type subscription_id: str

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

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
# coding=utf-8
33
# --------------------------------------------------------------------------
44
# Copyright (c) Microsoft Corporation. All rights reserved.
5-
# Licensed under the MIT License. See License.txt in the project root for
6-
# license information.
5+
# Licensed under the MIT License. See License.txt in the project root for license information.
6+
# Code generated by Microsoft (R) Python Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
78
# --------------------------------------------------------------------------
89
# pylint: disable=protected-access, broad-except
910

@@ -21,18 +22,14 @@
2122
from datetime import datetime, date, time, timedelta, timezone
2223
from json import JSONEncoder
2324
import xml.etree.ElementTree as ET
25+
from collections.abc import MutableMapping
2426
from typing_extensions import Self
2527
import isodate
2628
from azure.core.exceptions import DeserializationError
2729
from azure.core import CaseInsensitiveEnumMeta
2830
from azure.core.pipeline import PipelineResponse
2931
from azure.core.serialization import _Null
3032

31-
if sys.version_info >= (3, 9):
32-
from collections.abc import MutableMapping
33-
else:
34-
from typing import MutableMapping
35-
3633
_LOGGER = logging.getLogger(__name__)
3734

3835
__all__ = ["SdkJSONEncoder", "Model", "rest_field", "rest_discriminator"]
@@ -347,7 +344,7 @@ def _get_model(module_name: str, model_name: str):
347344
_UNSET = object()
348345

349346

350-
class _MyMutableMapping(MutableMapping[str, typing.Any]): # pylint: disable=unsubscriptable-object
347+
class _MyMutableMapping(MutableMapping[str, typing.Any]):
351348
def __init__(self, data: typing.Dict[str, typing.Any]) -> None:
352349
self._data = data
353350

@@ -407,13 +404,13 @@ def get(self, key: str, default: typing.Any = None) -> typing.Any:
407404
return default
408405

409406
@typing.overload
410-
def pop(self, key: str) -> typing.Any: ...
407+
def pop(self, key: str) -> typing.Any: ... # pylint: disable=arguments-differ
411408

412409
@typing.overload
413-
def pop(self, key: str, default: _T) -> _T: ...
410+
def pop(self, key: str, default: _T) -> _T: ... # pylint: disable=signature-differs
414411

415412
@typing.overload
416-
def pop(self, key: str, default: typing.Any) -> typing.Any: ...
413+
def pop(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs
417414

418415
def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any:
419416
"""
@@ -443,7 +440,7 @@ def clear(self) -> None:
443440
"""
444441
self._data.clear()
445442

446-
def update(self, *args: typing.Any, **kwargs: typing.Any) -> None:
443+
def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: # pylint: disable=arguments-differ
447444
"""
448445
Updates D from mapping/iterable E and F.
449446
:param any args: Either a mapping object or an iterable of key-value pairs.
@@ -454,7 +451,7 @@ def update(self, *args: typing.Any, **kwargs: typing.Any) -> None:
454451
def setdefault(self, key: str, default: None = None) -> None: ...
455452

456453
@typing.overload
457-
def setdefault(self, key: str, default: typing.Any) -> typing.Any: ...
454+
def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs
458455

459456
def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any:
460457
"""
@@ -644,7 +641,7 @@ def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self:
644641
cls._attr_to_rest_field: typing.Dict[str, _RestField] = dict(attr_to_rest_field.items())
645642
cls._calculated.add(f"{cls.__module__}.{cls.__qualname__}")
646643

647-
return super().__new__(cls) # pylint: disable=no-value-for-parameter
644+
return super().__new__(cls)
648645

649646
def __init_subclass__(cls, discriminator: typing.Optional[str] = None) -> None:
650647
for base in cls.__bases__:
@@ -680,7 +677,7 @@ def _deserialize(cls, data, exist_discriminators):
680677
discriminator_value = data.find(xml_name).text # pyright: ignore
681678
else:
682679
discriminator_value = data.get(discriminator._rest_name)
683-
mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore
680+
mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member
684681
return mapped_cls._deserialize(data, exist_discriminators)
685682

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

0 commit comments

Comments
 (0)