Skip to content

Commit 4cb6593

Browse files
author
SDKAuto
committed
CodeGen from PR 30955 in Azure/azure-rest-api-specs
Merge 9a8c8690136ea92088353a85ac7e7731000f449c into 491dbe210848ae24740e0018fa8d7f72f480f177
1 parent d9b2543 commit 4cb6593

File tree

13 files changed

+60
-78
lines changed

13 files changed

+60
-78
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"commit": "f93850874010501f216ceadf19459402efd16d9e",
2+
"commit": "5c8f966bfa583ef6a1064f73b3f78f3d6767a002",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"typespec_src": "specification/mongocluster/DocumentDB.MongoCluster.Management",
5-
"@azure-tools/typespec-python": "0.33.0"
5+
"@azure-tools/typespec-python": "0.35.1"
66
}

sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/_client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,10 @@
2727
)
2828

2929
if TYPE_CHECKING:
30-
# pylint: disable=unused-import,ungrouped-imports
3130
from azure.core.credentials import TokenCredential
3231

3332

34-
class MongoClusterMgmtClient: # pylint: disable=client-accepts-api-version-keyword
33+
class MongoClusterMgmtClient:
3534
"""The Microsoft Azure management API provides create, read, update, and delete functionality for
3635
Azure Cosmos DB for MongoDB vCore resources including clusters and firewall rules.
3736

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414
from ._version import VERSION
1515

1616
if TYPE_CHECKING:
17-
# pylint: disable=unused-import,ungrouped-imports
1817
from azure.core.credentials import TokenCredential
1918

2019

21-
class MongoClusterMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
20+
class MongoClusterMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes
2221
"""Configuration for MongoClusterMgmtClient.
2322
2423
Note that all parameters used to create this instance are saved as instance

sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/_model_base.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# pylint: disable=too-many-lines
12
# coding=utf-8
23
# --------------------------------------------------------------------------
34
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -636,7 +637,7 @@ def _deserialize(cls, data, exist_discriminators):
636637
return mapped_cls._deserialize(data, exist_discriminators)
637638

638639
def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]:
639-
"""Return a dict that can be JSONify using json.dump.
640+
"""Return a dict that can be turned into json using json.dump.
640641
641642
:keyword bool exclude_readonly: Whether to remove the readonly properties.
642643
:returns: A dict JSON compatible object
@@ -733,7 +734,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An
733734
)
734735

735736

736-
def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912
737+
def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches
737738
annotation: typing.Any,
738739
module: typing.Optional[str],
739740
rf: typing.Optional["_RestField"] = None,

sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/_serialization.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# pylint: disable=too-many-lines
21
# --------------------------------------------------------------------------
32
#
43
# Copyright (c) Microsoft Corporation. All rights reserved.

sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "1.0.0"
9+
VERSION = "1.0.0b1"

sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/aio/_client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,10 @@
2727
)
2828

2929
if TYPE_CHECKING:
30-
# pylint: disable=unused-import,ungrouped-imports
3130
from azure.core.credentials_async import AsyncTokenCredential
3231

3332

34-
class MongoClusterMgmtClient: # pylint: disable=client-accepts-api-version-keyword
33+
class MongoClusterMgmtClient:
3534
"""The Microsoft Azure management API provides create, read, update, and delete functionality for
3635
Azure Cosmos DB for MongoDB vCore resources including clusters and firewall rules.
3736

sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/aio/_configuration.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414
from .._version import VERSION
1515

1616
if TYPE_CHECKING:
17-
# pylint: disable=unused-import,ungrouped-imports
1817
from azure.core.credentials_async import AsyncTokenCredential
1918

2019

21-
class MongoClusterMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
20+
class MongoClusterMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes
2221
"""Configuration for MongoClusterMgmtClient.
2322
2423
Note that all parameters used to create this instance are saved as instance

sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/aio/operations/_operations.py

Lines changed: 23 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# pylint: disable=too-many-lines,too-many-statements
1+
# pylint: disable=too-many-lines
22
# coding=utf-8
33
# --------------------------------------------------------------------------
44
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -9,21 +9,7 @@
99
from io import IOBase
1010
import json
1111
import sys
12-
from typing import (
13-
Any,
14-
AsyncIterable,
15-
AsyncIterator,
16-
Callable,
17-
Dict,
18-
IO,
19-
List,
20-
Optional,
21-
Type,
22-
TypeVar,
23-
Union,
24-
cast,
25-
overload,
26-
)
12+
from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload
2713
import urllib.parse
2814

2915
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -75,7 +61,7 @@
7561
if sys.version_info >= (3, 9):
7662
from collections.abc import MutableMapping
7763
else:
78-
from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
64+
from typing import MutableMapping # type: ignore
7965
T = TypeVar("T")
8066
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
8167
JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object
@@ -114,7 +100,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]:
114100

115101
cls: ClsType[List[_models.Operation]] = kwargs.pop("cls", None)
116102

117-
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
103+
error_map: MutableMapping = {
118104
401: ClientAuthenticationError,
119105
404: ResourceNotFoundError,
120106
409: ResourceExistsError,
@@ -218,7 +204,7 @@ async def get(self, resource_group_name: str, mongo_cluster_name: str, **kwargs:
218204
:rtype: ~azure.mgmt.mongocluster.models.MongoCluster
219205
:raises ~azure.core.exceptions.HttpResponseError:
220206
"""
221-
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
207+
error_map: MutableMapping = {
222208
401: ClientAuthenticationError,
223209
404: ResourceNotFoundError,
224210
409: ResourceExistsError,
@@ -281,7 +267,7 @@ async def _create_or_update_initial(
281267
resource: Union[_models.MongoCluster, JSON, IO[bytes]],
282268
**kwargs: Any
283269
) -> AsyncIterator[bytes]:
284-
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
270+
error_map: MutableMapping = {
285271
401: ClientAuthenticationError,
286272
404: ResourceNotFoundError,
287273
409: ResourceExistsError,
@@ -520,7 +506,7 @@ async def _update_initial(
520506
properties: Union[_models.MongoClusterUpdate, JSON, IO[bytes]],
521507
**kwargs: Any
522508
) -> AsyncIterator[bytes]:
523-
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
509+
error_map: MutableMapping = {
524510
401: ClientAuthenticationError,
525511
404: ResourceNotFoundError,
526512
409: ResourceExistsError,
@@ -756,7 +742,7 @@ def get_long_running_output(pipeline_response):
756742
async def _delete_initial(
757743
self, resource_group_name: str, mongo_cluster_name: str, **kwargs: Any
758744
) -> AsyncIterator[bytes]:
759-
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
745+
error_map: MutableMapping = {
760746
401: ClientAuthenticationError,
761747
404: ResourceNotFoundError,
762748
409: ResourceExistsError,
@@ -891,7 +877,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy
891877

892878
cls: ClsType[List[_models.MongoCluster]] = kwargs.pop("cls", None)
893879

894-
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
880+
error_map: MutableMapping = {
895881
401: ClientAuthenticationError,
896882
404: ResourceNotFoundError,
897883
409: ResourceExistsError,
@@ -979,7 +965,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.MongoCluster"]:
979965

980966
cls: ClsType[List[_models.MongoCluster]] = kwargs.pop("cls", None)
981967

982-
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
968+
error_map: MutableMapping = {
983969
401: ClientAuthenticationError,
984970
404: ResourceNotFoundError,
985971
409: ResourceExistsError,
@@ -1070,7 +1056,7 @@ async def list_connection_strings(
10701056
:rtype: ~azure.mgmt.mongocluster.models.ListConnectionStringsResult
10711057
:raises ~azure.core.exceptions.HttpResponseError:
10721058
"""
1073-
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1059+
error_map: MutableMapping = {
10741060
401: ClientAuthenticationError,
10751061
404: ResourceNotFoundError,
10761062
409: ResourceExistsError,
@@ -1204,7 +1190,7 @@ async def check_name_availability(
12041190
:rtype: ~azure.mgmt.mongocluster.models.CheckNameAvailabilityResponse
12051191
:raises ~azure.core.exceptions.HttpResponseError:
12061192
"""
1207-
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1193+
error_map: MutableMapping = {
12081194
401: ClientAuthenticationError,
12091195
404: ResourceNotFoundError,
12101196
409: ResourceExistsError,
@@ -1287,7 +1273,7 @@ async def _promote_initial(
12871273
body: Union[_models.PromoteReplicaRequest, JSON, IO[bytes]],
12881274
**kwargs: Any
12891275
) -> AsyncIterator[bytes]:
1290-
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1276+
error_map: MutableMapping = {
12911277
401: ClientAuthenticationError,
12921278
404: ResourceNotFoundError,
12931279
409: ResourceExistsError,
@@ -1552,7 +1538,7 @@ async def get(
15521538
:rtype: ~azure.mgmt.mongocluster.models.FirewallRule
15531539
:raises ~azure.core.exceptions.HttpResponseError:
15541540
"""
1555-
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1541+
error_map: MutableMapping = {
15561542
401: ClientAuthenticationError,
15571543
404: ResourceNotFoundError,
15581544
409: ResourceExistsError,
@@ -1617,7 +1603,7 @@ async def _create_or_update_initial(
16171603
resource: Union[_models.FirewallRule, JSON, IO[bytes]],
16181604
**kwargs: Any
16191605
) -> AsyncIterator[bytes]:
1620-
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1606+
error_map: MutableMapping = {
16211607
401: ClientAuthenticationError,
16221608
404: ResourceNotFoundError,
16231609
409: ResourceExistsError,
@@ -1863,7 +1849,7 @@ def get_long_running_output(pipeline_response):
18631849
async def _delete_initial(
18641850
self, resource_group_name: str, mongo_cluster_name: str, firewall_rule_name: str, **kwargs: Any
18651851
) -> AsyncIterator[bytes]:
1866-
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1852+
error_map: MutableMapping = {
18671853
401: ClientAuthenticationError,
18681854
404: ResourceNotFoundError,
18691855
409: ResourceExistsError,
@@ -2006,7 +1992,7 @@ def list_by_mongo_cluster(
20061992

20071993
cls: ClsType[List[_models.FirewallRule]] = kwargs.pop("cls", None)
20081994

2009-
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1995+
error_map: MutableMapping = {
20101996
401: ClientAuthenticationError,
20111997
404: ResourceNotFoundError,
20121998
409: ResourceExistsError,
@@ -2121,7 +2107,7 @@ def list_by_mongo_cluster(
21212107

21222108
cls: ClsType[List[_models.PrivateEndpointConnectionResource]] = kwargs.pop("cls", None)
21232109

2124-
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
2110+
error_map: MutableMapping = {
21252111
401: ClientAuthenticationError,
21262112
404: ResourceNotFoundError,
21272113
409: ResourceExistsError,
@@ -2216,7 +2202,7 @@ async def get(
22162202
:rtype: ~azure.mgmt.mongocluster.models.PrivateEndpointConnectionResource
22172203
:raises ~azure.core.exceptions.HttpResponseError:
22182204
"""
2219-
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
2205+
error_map: MutableMapping = {
22202206
401: ClientAuthenticationError,
22212207
404: ResourceNotFoundError,
22222208
409: ResourceExistsError,
@@ -2281,7 +2267,7 @@ async def _create_initial(
22812267
resource: Union[_models.PrivateEndpointConnectionResource, JSON, IO[bytes]],
22822268
**kwargs: Any
22832269
) -> AsyncIterator[bytes]:
2284-
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
2270+
error_map: MutableMapping = {
22852271
401: ClientAuthenticationError,
22862272
404: ResourceNotFoundError,
22872273
409: ResourceExistsError,
@@ -2540,7 +2526,7 @@ def get_long_running_output(pipeline_response):
25402526
async def _delete_initial(
25412527
self, resource_group_name: str, mongo_cluster_name: str, private_endpoint_connection_name: str, **kwargs: Any
25422528
) -> AsyncIterator[bytes]:
2543-
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
2529+
error_map: MutableMapping = {
25442530
401: ClientAuthenticationError,
25452531
404: ResourceNotFoundError,
25462532
409: ResourceExistsError,
@@ -2703,7 +2689,7 @@ def list_by_mongo_cluster(
27032689

27042690
cls: ClsType[List[_models.PrivateLinkResource]] = kwargs.pop("cls", None)
27052691

2706-
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
2692+
error_map: MutableMapping = {
27072693
401: ClientAuthenticationError,
27082694
404: ResourceNotFoundError,
27092695
409: ResourceExistsError,
@@ -2827,7 +2813,7 @@ def list_by_parent(
28272813

28282814
cls: ClsType[List[_models.Replica]] = kwargs.pop("cls", None)
28292815

2830-
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
2816+
error_map: MutableMapping = {
28312817
401: ClientAuthenticationError,
28322818
404: ResourceNotFoundError,
28332819
409: ResourceExistsError,

sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/models/_models.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# coding=utf-8
21
# pylint: disable=too-many-lines
2+
# coding=utf-8
33
# --------------------------------------------------------------------------
44
# Copyright (c) Microsoft Corporation. All rights reserved.
55
# Licensed under the MIT License. See License.txt in the project root for license information.
@@ -14,7 +14,6 @@
1414
from .._model_base import rest_field
1515

1616
if TYPE_CHECKING:
17-
# pylint: disable=unused-import,ungrouped-imports
1817
from .. import models as _models
1918

2019

0 commit comments

Comments
 (0)