Skip to content

Commit 7888119

Browse files
author
SDKAuto
committed
CodeGen from PR 21907 in Azure/azure-rest-api-specs
Merge 544390b7d60fca57482604550b24a83a2a830bd9 into 716adefbbcefe848196de00308920e6eedfebe56
1 parent 1e4d4ad commit 7888119

File tree

119 files changed

+6730
-2234
lines changed

Some content is hidden

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

119 files changed

+6730
-2234
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2+
"commit": "e0f435e4de9eab69629e19a0754962ac6b22b8f4",
3+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
24
"autorest": "3.9.2",
35
"use": [
4-
"@autorest/python@6.1.11",
6+
"@autorest/python@6.2.16",
57
"@autorest/modelerfour@4.24.3"
68
],
7-
"commit": "d1eee5499dbf9281debdc90c4f4cbc7470fb8d6d",
8-
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/netapp/resource-manager/readme.md --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.1.11 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/netapp/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.2.16 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
1010
"readme": "specification/netapp/resource-manager/readme.md"
1111
}

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@
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
2020

21-
__all__ = ["NetAppManagementClient"]
21+
__all__ = [
22+
"NetAppManagementClient",
23+
]
2224
__all__.extend([p for p in _patch_all if p not in __all__])
2325

2426
_patch_sdk()

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

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

9+
import sys
910
from typing import Any, TYPE_CHECKING
1011

1112
from azure.core.configuration import Configuration
@@ -14,6 +15,11 @@
1415

1516
from ._version import VERSION
1617

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+
1723
if TYPE_CHECKING:
1824
# pylint: disable=unused-import,ungrouped-imports
1925
from azure.core.credentials import TokenCredential
@@ -37,7 +43,7 @@ class NetAppManagementClientConfiguration(Configuration): # pylint: disable=too
3743

3844
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
3945
super(NetAppManagementClientConfiguration, self).__init__(**kwargs)
40-
api_version = kwargs.pop("api_version", "2022-05-01") # type: str
46+
api_version: Literal["2022-05-01"] = kwargs.pop("api_version", "2022-05-01")
4147

4248
if credential is None:
4349
raise ValueError("Parameter 'credential' must not be None.")
@@ -51,10 +57,7 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs
5157
kwargs.setdefault("sdk_moniker", "mgmt-netapp/{}".format(VERSION))
5258
self._configure(**kwargs)
5359

54-
def _configure(
55-
self, **kwargs # type: Any
56-
):
57-
# type: (...) -> None
60+
def _configure(self, **kwargs: Any) -> None:
5861
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
5962
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
6063
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)

sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_net_app_management_client.py

Lines changed: 5 additions & 8 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 NetAppManagementClientConfiguration
1717
from ._serialization import Deserializer, Serializer
1818
from .operations import (
@@ -98,7 +98,7 @@ def __init__(
9898
)
9999
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
100100

101-
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
101+
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
102102
self._serialize = Serializer(client_models)
103103
self._deserialize = Deserializer(client_models)
104104
self._serialize.client_side_validation = False
@@ -146,15 +146,12 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
146146
request_copy.url = self._client.format_url(request_copy.url)
147147
return self._client.send_request(request_copy, **kwargs)
148148

149-
def close(self):
150-
# type: () -> None
149+
def close(self) -> None:
151150
self._client.close()
152151

153-
def __enter__(self):
154-
# type: () -> NetAppManagementClient
152+
def __enter__(self) -> "NetAppManagementClient":
155153
self._client.__enter__()
156154
return self
157155

158-
def __exit__(self, *exc_details):
159-
# type: (Any) -> None
156+
def __exit__(self, *exc_details) -> None:
160157
self._client.__exit__(*exc_details)

0 commit comments

Comments
 (0)