Skip to content

Commit 4b5467f

Browse files
AutoPrFromHttpClientPythonAutoPrFromHttpClientPython
authored andcommitted
Regenerate for typespec-python (2025-08-15 09:54:13)
1 parent 142a087 commit 4b5467f

35 files changed

Lines changed: 242 additions & 99 deletions

File tree

packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/models/_models.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,7 @@ def __init__(self, mapping: Mapping[str, Any]) -> None:
307307
"""
308308

309309
def __init__(self, *args: Any, **kwargs: Any) -> None:
310-
super().__init__(*args, **kwargs)
311-
self.kind = "real" # type: ignore
310+
super().__init__(*args, kind="real", **kwargs)
312311

313312

314313
class SharedModel(_Model):

packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/_operations/_operations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def build_traits_smoke_test_request(
5050
if_unmodified_since: Optional[datetime.datetime] = None,
5151
if_modified_since: Optional[datetime.datetime] = None,
5252
etag: Optional[str] = None,
53-
match_condition: Optional[MatchConditions] = None,
53+
match_condition: Optional["MatchConditions"] = None,
5454
**kwargs: Any
5555
) -> HttpRequest:
5656
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
@@ -133,7 +133,7 @@ def smoke_test(
133133
if_unmodified_since: Optional[datetime.datetime] = None,
134134
if_modified_since: Optional[datetime.datetime] = None,
135135
etag: Optional[str] = None,
136-
match_condition: Optional[MatchConditions] = None,
136+
match_condition: Optional["MatchConditions"] = None,
137137
**kwargs: Any
138138
) -> _models.User:
139139
"""Get a resource, sending and receiving headers.

packages/typespec-python/test/azure/generated/azure-core-traits/specs/azure/core/traits/aio/_operations/_operations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ async def smoke_test(
5353
if_unmodified_since: Optional[datetime.datetime] = None,
5454
if_modified_since: Optional[datetime.datetime] = None,
5555
etag: Optional[str] = None,
56-
match_condition: Optional[MatchConditions] = None,
56+
match_condition: Optional["MatchConditions"] = None,
5757
**kwargs: Any
5858
) -> _models.User:
5959
"""Get a resource, sending and receiving headers.

packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/_client.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from .operations import ErrorOperations, ManagedIdentityOperations
2323

2424
if TYPE_CHECKING:
25+
from azure.core import AzureClouds
2526
from azure.core.credentials import TokenCredential
2627

2728

@@ -39,17 +40,26 @@ class CommonPropertiesClient:
3940
:type subscription_id: str
4041
:param base_url: Service host. Default value is None.
4142
:type base_url: str
43+
:keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
44+
None.
45+
:paramtype cloud_setting: ~azure.core.AzureClouds
4246
:keyword api_version: The API version to use for this operation. Default value is
4347
"2023-12-01-preview". Note that overriding this default value may result in unsupported
4448
behavior.
4549
:paramtype api_version: str
4650
"""
4751

4852
def __init__(
49-
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
53+
self,
54+
credential: "TokenCredential",
55+
subscription_id: str,
56+
base_url: Optional[str] = None,
57+
*,
58+
cloud_setting: Optional["AzureClouds"] = None,
59+
**kwargs: Any
5060
) -> None:
5161
_endpoint = "{endpoint}"
52-
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
62+
_cloud = cloud_setting or settings.current.azure_cloud # type: ignore
5363
_endpoints = get_arm_endpoints(_cloud)
5464
if not base_url:
5565
base_url = _endpoints["resource_manager"]
@@ -58,6 +68,7 @@ def __init__(
5868
credential=credential,
5969
subscription_id=subscription_id,
6070
base_url=cast(str, base_url),
71+
cloud_setting=cloud_setting,
6172
credential_scopes=credential_scopes,
6273
**kwargs
6374
)

packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/_configuration.py

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

9-
from typing import Any, TYPE_CHECKING
9+
from typing import Any, Optional, TYPE_CHECKING
1010

1111
from azure.core.pipeline import policies
1212
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
1313

1414
from ._version import VERSION
1515

1616
if TYPE_CHECKING:
17+
from azure.core import AzureClouds
1718
from azure.core.credentials import TokenCredential
1819

1920

@@ -29,6 +30,9 @@ class CommonPropertiesClientConfiguration: # pylint: disable=too-many-instance-
2930
:type subscription_id: str
3031
:param base_url: Service host. Default value is "https://management.azure.com".
3132
:type base_url: str
33+
:param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
34+
None.
35+
:type cloud_setting: ~azure.core.AzureClouds
3236
:keyword api_version: The API version to use for this operation. Default value is
3337
"2023-12-01-preview". Note that overriding this default value may result in unsupported
3438
behavior.
@@ -40,6 +44,7 @@ def __init__(
4044
credential: "TokenCredential",
4145
subscription_id: str,
4246
base_url: str = "https://management.azure.com",
47+
cloud_setting: Optional["AzureClouds"] = None,
4348
**kwargs: Any
4449
) -> None:
4550
api_version: str = kwargs.pop("api_version", "2023-12-01-preview")
@@ -52,6 +57,7 @@ def __init__(
5257
self.credential = credential
5358
self.subscription_id = subscription_id
5459
self.base_url = base_url
60+
self.cloud_setting = cloud_setting
5561
self.api_version = api_version
5662
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
5763
kwargs.setdefault("sdk_moniker", "resourcemanager-commonproperties/{}".format(VERSION))

packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/aio/_client.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from .operations import ErrorOperations, ManagedIdentityOperations
2323

2424
if TYPE_CHECKING:
25+
from azure.core import AzureClouds
2526
from azure.core.credentials_async import AsyncTokenCredential
2627

2728

@@ -39,17 +40,26 @@ class CommonPropertiesClient:
3940
:type subscription_id: str
4041
:param base_url: Service host. Default value is None.
4142
:type base_url: str
43+
:keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
44+
None.
45+
:paramtype cloud_setting: ~azure.core.AzureClouds
4246
:keyword api_version: The API version to use for this operation. Default value is
4347
"2023-12-01-preview". Note that overriding this default value may result in unsupported
4448
behavior.
4549
:paramtype api_version: str
4650
"""
4751

4852
def __init__(
49-
self, credential: "AsyncTokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
53+
self,
54+
credential: "AsyncTokenCredential",
55+
subscription_id: str,
56+
base_url: Optional[str] = None,
57+
*,
58+
cloud_setting: Optional["AzureClouds"] = None,
59+
**kwargs: Any
5060
) -> None:
5161
_endpoint = "{endpoint}"
52-
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
62+
_cloud = cloud_setting or settings.current.azure_cloud # type: ignore
5363
_endpoints = get_arm_endpoints(_cloud)
5464
if not base_url:
5565
base_url = _endpoints["resource_manager"]
@@ -58,6 +68,7 @@ def __init__(
5868
credential=credential,
5969
subscription_id=subscription_id,
6070
base_url=cast(str, base_url),
71+
cloud_setting=cloud_setting,
6172
credential_scopes=credential_scopes,
6273
**kwargs
6374
)

packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/aio/_configuration.py

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

9-
from typing import Any, TYPE_CHECKING
9+
from typing import Any, Optional, TYPE_CHECKING
1010

1111
from azure.core.pipeline import policies
1212
from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy
1313

1414
from .._version import VERSION
1515

1616
if TYPE_CHECKING:
17+
from azure.core import AzureClouds
1718
from azure.core.credentials_async import AsyncTokenCredential
1819

1920

@@ -29,6 +30,9 @@ class CommonPropertiesClientConfiguration: # pylint: disable=too-many-instance-
2930
:type subscription_id: str
3031
:param base_url: Service host. Default value is "https://management.azure.com".
3132
:type base_url: str
33+
:param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
34+
None.
35+
:type cloud_setting: ~azure.core.AzureClouds
3236
:keyword api_version: The API version to use for this operation. Default value is
3337
"2023-12-01-preview". Note that overriding this default value may result in unsupported
3438
behavior.
@@ -40,6 +44,7 @@ def __init__(
4044
credential: "AsyncTokenCredential",
4145
subscription_id: str,
4246
base_url: str = "https://management.azure.com",
47+
cloud_setting: Optional["AzureClouds"] = None,
4348
**kwargs: Any
4449
) -> None:
4550
api_version: str = kwargs.pop("api_version", "2023-12-01-preview")
@@ -52,6 +57,7 @@ def __init__(
5257
self.credential = credential
5358
self.subscription_id = subscription_id
5459
self.base_url = base_url
60+
self.cloud_setting = cloud_setting
5561
self.api_version = api_version
5662
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
5763
kwargs.setdefault("sdk_moniker", "resourcemanager-commonproperties/{}".format(VERSION))

packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/_client.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from .operations import LargeHeadersOperations
2323

2424
if TYPE_CHECKING:
25+
from azure.core import AzureClouds
2526
from azure.core.credentials import TokenCredential
2627

2728

@@ -36,6 +37,9 @@ class LargeHeaderClient:
3637
:type subscription_id: str
3738
:param base_url: Service host. Default value is None.
3839
:type base_url: str
40+
:keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
41+
None.
42+
:paramtype cloud_setting: ~azure.core.AzureClouds
3943
:keyword api_version: The API version to use for this operation. Default value is
4044
"2023-12-01-preview". Note that overriding this default value may result in unsupported
4145
behavior.
@@ -45,10 +49,16 @@ class LargeHeaderClient:
4549
"""
4650

4751
def __init__(
48-
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
52+
self,
53+
credential: "TokenCredential",
54+
subscription_id: str,
55+
base_url: Optional[str] = None,
56+
*,
57+
cloud_setting: Optional["AzureClouds"] = None,
58+
**kwargs: Any
4959
) -> None:
5060
_endpoint = "{endpoint}"
51-
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
61+
_cloud = cloud_setting or settings.current.azure_cloud # type: ignore
5262
_endpoints = get_arm_endpoints(_cloud)
5363
if not base_url:
5464
base_url = _endpoints["resource_manager"]
@@ -57,6 +67,7 @@ def __init__(
5767
credential=credential,
5868
subscription_id=subscription_id,
5969
base_url=cast(str, base_url),
70+
cloud_setting=cloud_setting,
6071
credential_scopes=credential_scopes,
6172
**kwargs
6273
)

packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/_configuration.py

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

9-
from typing import Any, TYPE_CHECKING
9+
from typing import Any, Optional, TYPE_CHECKING
1010

1111
from azure.core.pipeline import policies
1212
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
1313

1414
from ._version import VERSION
1515

1616
if TYPE_CHECKING:
17+
from azure.core import AzureClouds
1718
from azure.core.credentials import TokenCredential
1819

1920

@@ -29,6 +30,9 @@ class LargeHeaderClientConfiguration: # pylint: disable=too-many-instance-attri
2930
:type subscription_id: str
3031
:param base_url: Service host. Default value is "https://management.azure.com".
3132
:type base_url: str
33+
:param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
34+
None.
35+
:type cloud_setting: ~azure.core.AzureClouds
3236
:keyword api_version: The API version to use for this operation. Default value is
3337
"2023-12-01-preview". Note that overriding this default value may result in unsupported
3438
behavior.
@@ -40,6 +44,7 @@ def __init__(
4044
credential: "TokenCredential",
4145
subscription_id: str,
4246
base_url: str = "https://management.azure.com",
47+
cloud_setting: Optional["AzureClouds"] = None,
4348
**kwargs: Any
4449
) -> None:
4550
api_version: str = kwargs.pop("api_version", "2023-12-01-preview")
@@ -52,6 +57,7 @@ def __init__(
5257
self.credential = credential
5358
self.subscription_id = subscription_id
5459
self.base_url = base_url
60+
self.cloud_setting = cloud_setting
5561
self.api_version = api_version
5662
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
5763
kwargs.setdefault("sdk_moniker", "resourcemanager-largeheader/{}".format(VERSION))

packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/aio/_client.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from .operations import LargeHeadersOperations
2323

2424
if TYPE_CHECKING:
25+
from azure.core import AzureClouds
2526
from azure.core.credentials_async import AsyncTokenCredential
2627

2728

@@ -36,6 +37,9 @@ class LargeHeaderClient:
3637
:type subscription_id: str
3738
:param base_url: Service host. Default value is None.
3839
:type base_url: str
40+
:keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
41+
None.
42+
:paramtype cloud_setting: ~azure.core.AzureClouds
3943
:keyword api_version: The API version to use for this operation. Default value is
4044
"2023-12-01-preview". Note that overriding this default value may result in unsupported
4145
behavior.
@@ -45,10 +49,16 @@ class LargeHeaderClient:
4549
"""
4650

4751
def __init__(
48-
self, credential: "AsyncTokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
52+
self,
53+
credential: "AsyncTokenCredential",
54+
subscription_id: str,
55+
base_url: Optional[str] = None,
56+
*,
57+
cloud_setting: Optional["AzureClouds"] = None,
58+
**kwargs: Any
4959
) -> None:
5060
_endpoint = "{endpoint}"
51-
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
61+
_cloud = cloud_setting or settings.current.azure_cloud # type: ignore
5262
_endpoints = get_arm_endpoints(_cloud)
5363
if not base_url:
5464
base_url = _endpoints["resource_manager"]
@@ -57,6 +67,7 @@ def __init__(
5767
credential=credential,
5868
subscription_id=subscription_id,
5969
base_url=cast(str, base_url),
70+
cloud_setting=cloud_setting,
6071
credential_scopes=credential_scopes,
6172
**kwargs
6273
)

0 commit comments

Comments
 (0)