Skip to content

Commit aa01634

Browse files
author
SDKAuto
committed
CodeGen from PR 30578 in Azure/azure-rest-api-specs
Merge 2e7642da2ac21fa179fdac1b59f1ec10df039917 into f14445d3b414c86ef608ac9c6750ff203702e1f2
1 parent 5136a43 commit aa01634

File tree

11 files changed

+100
-64
lines changed

11 files changed

+100
-64
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"commit": "9ce76c4f113368361dac4de5d0a71eb058602756",
2+
"commit": "5d09a716e1f6191dc135d8655e194784a8cea25e",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"typespec_src": "specification/fabric/Microsoft.Fabric.Management",
5-
"@azure-tools/typespec-python": "0.36.0"
5+
"@azure-tools/typespec-python": "0.36.1"
66
}

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,21 @@
55
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
8+
# pylint: disable=wrong-import-position
89

9-
from ._client import FabricMgmtClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._client import FabricMgmtClient # type: ignore
1016
from ._version import VERSION
1117

1218
__version__ = VERSION
1319

1420
try:
1521
from ._patch import __all__ as _patch_all
16-
from ._patch import * # pylint: disable=unused-wildcard-import
22+
from ._patch import *
1723
except ImportError:
1824
_patch_all = []
1925
from ._patch import patch_sdk as _patch_sdk

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Licensed under the MIT License. See License.txt in the project root for
66
# license information.
77
# --------------------------------------------------------------------------
8-
# pylint: disable=protected-access, arguments-differ, signature-differs, broad-except, too-many-lines
8+
# pylint: disable=protected-access, broad-except
99

1010
import copy
1111
import calendar
@@ -574,7 +574,7 @@ def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None:
574574
def copy(self) -> "Model":
575575
return Model(self.__dict__)
576576

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

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

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

614614
@classmethod
615615
def _deserialize(cls, data, exist_discriminators):
616-
if not hasattr(cls, "__mapping__"): # pylint: disable=no-member
616+
if not hasattr(cls, "__mapping__"):
617617
return cls(data)
618618
discriminator = cls._get_discriminator(exist_discriminators)
619619
if discriminator is None:
@@ -633,7 +633,7 @@ def _deserialize(cls, data, exist_discriminators):
633633
discriminator_value = data.find(xml_name).text # pyright: ignore
634634
else:
635635
discriminator_value = data.get(discriminator._rest_name)
636-
mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member
636+
mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore
637637
return mapped_cls._deserialize(data, exist_discriminators)
638638

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

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# pylint: disable=too-many-lines
12
# --------------------------------------------------------------------------
23
#
34
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -506,7 +507,6 @@ def _flatten_subtype(cls, key, objects):
506507
def _classify(cls, response, objects):
507508
"""Check the class _subtype_map for any child classes.
508509
We want to ignore any inherited _subtype_maps.
509-
Remove the polymorphic key from the initial data.
510510
511511
:param dict response: The initial data
512512
:param dict objects: The class objects
@@ -518,7 +518,7 @@ def _classify(cls, response, objects):
518518

519519
if not isinstance(response, ET.Element):
520520
rest_api_response_key = cls._get_rest_key_parts(subtype_key)[-1]
521-
subtype_value = response.pop(rest_api_response_key, None) or response.pop(subtype_key, None)
521+
subtype_value = response.get(rest_api_response_key, None) or response.get(subtype_key, None)
522522
else:
523523
subtype_value = xml_key_extractor(subtype_key, cls._attribute_map[subtype_key], response)
524524
if subtype_value:

sdk/fabric/azure-mgmt-fabric/azure/mgmt/fabric/_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/fabric/azure-mgmt-fabric/azure/mgmt/fabric/aio/__init__.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,18 @@
55
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
8+
# pylint: disable=wrong-import-position
89

9-
from ._client import FabricMgmtClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._client import FabricMgmtClient # type: ignore
1016

1117
try:
1218
from ._patch import __all__ as _patch_all
13-
from ._patch import * # pylint: disable=unused-wildcard-import
19+
from ._patch import *
1420
except ImportError:
1521
_patch_all = []
1622
from ._patch import patch_sdk as _patch_sdk

sdk/fabric/azure-mgmt-fabric/azure/mgmt/fabric/aio/operations/__init__.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,18 @@
55
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
8+
# pylint: disable=wrong-import-position
89

9-
from ._operations import FabricCapacitiesOperations
10-
from ._operations import Operations
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._operations import FabricCapacitiesOperations # type: ignore
16+
from ._operations import Operations # type: ignore
1117

1218
from ._patch import __all__ as _patch_all
13-
from ._patch import * # pylint: disable=unused-wildcard-import
19+
from ._patch import *
1420
from ._patch import patch_sdk as _patch_sdk
1521

1622
__all__ = [

sdk/fabric/azure-mgmt-fabric/azure/mgmt/fabric/models/__init__.py

Lines changed: 37 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,46 @@
55
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
8+
# pylint: disable=wrong-import-position
89

9-
from ._models import CapacityAdministration
10-
from ._models import CheckNameAvailabilityRequest
11-
from ._models import CheckNameAvailabilityResponse
12-
from ._models import ErrorAdditionalInfo
13-
from ._models import ErrorDetail
14-
from ._models import ErrorResponse
15-
from ._models import FabricCapacity
16-
from ._models import FabricCapacityProperties
17-
from ._models import FabricCapacityUpdate
18-
from ._models import FabricCapacityUpdateProperties
19-
from ._models import Operation
20-
from ._models import OperationDisplay
21-
from ._models import Resource
22-
from ._models import RpSku
23-
from ._models import RpSkuDetailsForExistingResource
24-
from ._models import RpSkuDetailsForNewResource
25-
from ._models import SystemData
26-
from ._models import TrackedResource
10+
from typing import TYPE_CHECKING
2711

28-
from ._enums import ActionType
29-
from ._enums import CheckNameAvailabilityReason
30-
from ._enums import CreatedByType
31-
from ._enums import Origin
32-
from ._enums import ProvisioningState
33-
from ._enums import ResourceState
34-
from ._enums import RpSkuTier
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
16+
from ._models import ( # type: ignore
17+
CapacityAdministration,
18+
CheckNameAvailabilityRequest,
19+
CheckNameAvailabilityResponse,
20+
ErrorAdditionalInfo,
21+
ErrorDetail,
22+
ErrorResponse,
23+
FabricCapacity,
24+
FabricCapacityProperties,
25+
FabricCapacityUpdate,
26+
FabricCapacityUpdateProperties,
27+
Operation,
28+
OperationDisplay,
29+
Resource,
30+
RpSku,
31+
RpSkuDetailsForExistingResource,
32+
RpSkuDetailsForNewResource,
33+
SystemData,
34+
TrackedResource,
35+
)
36+
37+
from ._enums import ( # type: ignore
38+
ActionType,
39+
CheckNameAvailabilityReason,
40+
CreatedByType,
41+
Origin,
42+
ProvisioningState,
43+
ResourceState,
44+
RpSkuTier,
45+
)
3546
from ._patch import __all__ as _patch_all
36-
from ._patch import * # pylint: disable=unused-wildcard-import
47+
from ._patch import *
3748
from ._patch import patch_sdk as _patch_sdk
3849

3950
__all__ = [

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

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
8+
# pylint: disable=useless-super-delegation
89

910
import datetime
1011
from typing import Any, Dict, List, Mapping, Optional, TYPE_CHECKING, Union, overload
@@ -41,7 +42,7 @@ def __init__(self, mapping: Mapping[str, Any]) -> None:
4142
:type mapping: Mapping[str, Any]
4243
"""
4344

44-
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
45+
def __init__(self, *args: Any, **kwargs: Any) -> None:
4546
super().__init__(*args, **kwargs)
4647

4748

@@ -74,7 +75,7 @@ def __init__(self, mapping: Mapping[str, Any]) -> None:
7475
:type mapping: Mapping[str, Any]
7576
"""
7677

77-
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
78+
def __init__(self, *args: Any, **kwargs: Any) -> None:
7879
super().__init__(*args, **kwargs)
7980

8081

@@ -114,7 +115,7 @@ def __init__(self, mapping: Mapping[str, Any]) -> None:
114115
:type mapping: Mapping[str, Any]
115116
"""
116117

117-
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
118+
def __init__(self, *args: Any, **kwargs: Any) -> None:
118119
super().__init__(*args, **kwargs)
119120

120121

@@ -191,7 +192,7 @@ def __init__(self, mapping: Mapping[str, Any]) -> None:
191192
:type mapping: Mapping[str, Any]
192193
"""
193194

194-
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
195+
def __init__(self, *args: Any, **kwargs: Any) -> None:
195196
super().__init__(*args, **kwargs)
196197

197198

@@ -269,7 +270,7 @@ def __init__(self, mapping: Mapping[str, Any]) -> None:
269270
:type mapping: Mapping[str, Any]
270271
"""
271272

272-
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
273+
def __init__(self, *args: Any, **kwargs: Any) -> None:
273274
super().__init__(*args, **kwargs)
274275

275276

@@ -322,7 +323,7 @@ def __init__(self, mapping: Mapping[str, Any]) -> None:
322323
:type mapping: Mapping[str, Any]
323324
"""
324325

325-
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
326+
def __init__(self, *args: Any, **kwargs: Any) -> None:
326327
super().__init__(*args, **kwargs)
327328

328329

@@ -373,7 +374,7 @@ def __init__(self, mapping: Mapping[str, Any]) -> None:
373374
:type mapping: Mapping[str, Any]
374375
"""
375376

376-
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
377+
def __init__(self, *args: Any, **kwargs: Any) -> None:
377378
super().__init__(*args, **kwargs)
378379

379380

@@ -411,7 +412,7 @@ def __init__(self, mapping: Mapping[str, Any]) -> None:
411412
:type mapping: Mapping[str, Any]
412413
"""
413414

414-
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
415+
def __init__(self, *args: Any, **kwargs: Any) -> None:
415416
super().__init__(*args, **kwargs)
416417

417418

@@ -439,7 +440,7 @@ def __init__(self, mapping: Mapping[str, Any]) -> None:
439440
:type mapping: Mapping[str, Any]
440441
"""
441442

442-
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
443+
def __init__(self, *args: Any, **kwargs: Any) -> None:
443444
super().__init__(*args, **kwargs)
444445

445446

@@ -496,7 +497,7 @@ def __init__(self, mapping: Mapping[str, Any]) -> None:
496497
:type mapping: Mapping[str, Any]
497498
"""
498499

499-
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
500+
def __init__(self, *args: Any, **kwargs: Any) -> None:
500501
super().__init__(*args, **kwargs)
501502

502503

@@ -563,7 +564,7 @@ def __init__(self, mapping: Mapping[str, Any]) -> None:
563564
:type mapping: Mapping[str, Any]
564565
"""
565566

566-
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
567+
def __init__(self, *args: Any, **kwargs: Any) -> None:
567568
super().__init__(*args, **kwargs)
568569

569570

@@ -597,7 +598,7 @@ def __init__(self, mapping: Mapping[str, Any]) -> None:
597598
:type mapping: Mapping[str, Any]
598599
"""
599600

600-
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
601+
def __init__(self, *args: Any, **kwargs: Any) -> None:
601602
super().__init__(*args, **kwargs)
602603

603604

@@ -636,7 +637,7 @@ def __init__(self, mapping: Mapping[str, Any]) -> None:
636637
:type mapping: Mapping[str, Any]
637638
"""
638639

639-
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
640+
def __init__(self, *args: Any, **kwargs: Any) -> None:
640641
super().__init__(*args, **kwargs)
641642

642643

@@ -693,5 +694,5 @@ def __init__(self, mapping: Mapping[str, Any]) -> None:
693694
:type mapping: Mapping[str, Any]
694695
"""
695696

696-
def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation
697+
def __init__(self, *args: Any, **kwargs: Any) -> None:
697698
super().__init__(*args, **kwargs)

sdk/fabric/azure-mgmt-fabric/azure/mgmt/fabric/operations/__init__.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,18 @@
55
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
8+
# pylint: disable=wrong-import-position
89

9-
from ._operations import FabricCapacitiesOperations
10-
from ._operations import Operations
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._operations import FabricCapacitiesOperations # type: ignore
16+
from ._operations import Operations # type: ignore
1117

1218
from ._patch import __all__ as _patch_all
13-
from ._patch import * # pylint: disable=unused-wildcard-import
19+
from ._patch import *
1420
from ._patch import patch_sdk as _patch_sdk
1521

1622
__all__ = [

0 commit comments

Comments
 (0)