Skip to content

Commit 5cd5c3a

Browse files
author
SDKAuto
committed
CodeGen from PR 24163 in Azure/azure-rest-api-specs
Merge 4a2e07c9ee2560197b24c83f770ac63b917b85a1 into 6c6b16dc98d720304633b76c8e82c282ffa9cc08
1 parent f95583c commit 5cd5c3a

File tree

104 files changed

+1996
-1770
lines changed

Some content is hidden

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

104 files changed

+1996
-1770
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "fc3c409825d6a31ba909a88ea34dcc13165edc9c",
2+
"commit": "d6674842aa92b35ab3411008d8656e4e5dc0e066",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.9.2",
55
"use": [
6-
"@autorest/python@6.2.1",
6+
"@autorest/python@6.5.0",
77
"@autorest/modelerfour@4.24.3"
88
],
9-
"autorest_command": "autorest specification/batch/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.2.1 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/batch/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.5.0 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
1010
"readme": "specification/batch/resource-manager/readme.md"
1111
}

sdk/batch/azure-mgmt-batch/azure/mgmt/batch/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
try:
1515
from ._patch import __all__ as _patch_all
16-
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
16+
from ._patch import * # pylint: disable=unused-wildcard-import
1717
except ImportError:
1818
_patch_all = []
1919
from ._patch import patch_sdk as _patch_sdk

sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_batch_management_client.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from azure.core.rest import HttpRequest, HttpResponse
1313
from azure.mgmt.core import ARMPipelineClient
1414

15-
from . import models
15+
from . import models as _models
1616
from ._configuration import BatchManagementClientConfiguration
1717
from ._serialization import Deserializer, Serializer
1818
from .operations import (
@@ -61,7 +61,7 @@ class BatchManagementClient: # pylint: disable=client-accepts-api-version-keywo
6161
:type subscription_id: str
6262
:param base_url: Service URL. Default value is "https://management.azure.com".
6363
:type base_url: str
64-
:keyword api_version: Api Version. Default value is "2022-10-01". Note that overriding this
64+
:keyword api_version: Api Version. Default value is "2023-05-01". Note that overriding this
6565
default value may result in unsupported behavior.
6666
:paramtype api_version: str
6767
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -78,9 +78,9 @@ def __init__(
7878
self._config = BatchManagementClientConfiguration(
7979
credential=credential, subscription_id=subscription_id, **kwargs
8080
)
81-
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
81+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
8282

83-
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
83+
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
8484
self._serialize = Serializer(client_models)
8585
self._deserialize = Deserializer(client_models)
8686
self._serialize.client_side_validation = False
@@ -122,15 +122,12 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
122122
request_copy.url = self._client.format_url(request_copy.url)
123123
return self._client.send_request(request_copy, **kwargs)
124124

125-
def close(self):
126-
# type: () -> None
125+
def close(self) -> None:
127126
self._client.close()
128127

129-
def __enter__(self):
130-
# type: () -> BatchManagementClient
128+
def __enter__(self) -> "BatchManagementClient":
131129
self._client.__enter__()
132130
return self
133131

134-
def __exit__(self, *exc_details):
135-
# type: (Any) -> None
132+
def __exit__(self, *exc_details: Any) -> None:
136133
self._client.__exit__(*exc_details)

sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_configuration.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
import sys
109
from typing import Any, TYPE_CHECKING
1110

1211
from azure.core.configuration import Configuration
@@ -15,11 +14,6 @@
1514

1615
from ._version import VERSION
1716

18-
if sys.version_info >= (3, 8):
19-
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
20-
else:
21-
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
22-
2317
if TYPE_CHECKING:
2418
# pylint: disable=unused-import,ungrouped-imports
2519
from azure.core.credentials import TokenCredential
@@ -36,14 +30,14 @@ class BatchManagementClientConfiguration(Configuration): # pylint: disable=too-
3630
:param subscription_id: The Azure subscription ID. This is a GUID-formatted string (e.g.
3731
00000000-0000-0000-0000-000000000000). Required.
3832
:type subscription_id: str
39-
:keyword api_version: Api Version. Default value is "2022-10-01". Note that overriding this
33+
:keyword api_version: Api Version. Default value is "2023-05-01". Note that overriding this
4034
default value may result in unsupported behavior.
4135
:paramtype api_version: str
4236
"""
4337

4438
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
4539
super(BatchManagementClientConfiguration, self).__init__(**kwargs)
46-
api_version = kwargs.pop("api_version", "2022-10-01") # type: Literal["2022-10-01"]
40+
api_version: str = kwargs.pop("api_version", "2023-05-01")
4741

4842
if credential is None:
4943
raise ValueError("Parameter 'credential' must not be None.")
@@ -57,10 +51,7 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs
5751
kwargs.setdefault("sdk_moniker", "mgmt-batch/{}".format(VERSION))
5852
self._configure(**kwargs)
5953

60-
def _configure(
61-
self, **kwargs # type: Any
62-
):
63-
# type: (...) -> None
54+
def _configure(self, **kwargs: Any) -> None:
6455
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
6556
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
6657
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)

0 commit comments

Comments
 (0)