Skip to content

Commit dbb4f75

Browse files
author
SDKAuto
committed
CodeGen from PR 33408 in Azure/azure-rest-api-specs
Merge 95a504e74104184081c0613a664f956d2f28e36f into 54c34f7f3c917d63b5fc8d64bd6f46a3637bde31
1 parent 2c9d31e commit dbb4f75

30 files changed

+8459
-56270
lines changed

sdk/batch/azure-batch/_meta.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"commit": "b4f25104369086b240470c4b480f1f4a3eef1419",
3+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4+
"typespec_src": "specification/batch/Azure.Batch",
5+
"@azure-tools/typespec-python": "0.40.0"
6+
}

sdk/batch/azure-batch/apiview-properties.json

Lines changed: 286 additions & 0 deletions
Large diffs are not rendered by default.

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,28 @@
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 BatchClient
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 BatchClient # 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
2026

2127
__all__ = [
2228
"BatchClient",
2329
]
24-
__all__.extend([p for p in _patch_all if p not in __all__])
30+
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
2531

2632
_patch_sdk()

sdk/batch/azure-batch/azure/batch/_client.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from copy import deepcopy
1010
from typing import Any, TYPE_CHECKING
11+
from typing_extensions import Self
1112

1213
from azure.core import PipelineClient
1314
from azure.core.pipeline import policies
@@ -18,20 +19,20 @@
1819
from ._serialization import Deserializer, Serializer
1920

2021
if TYPE_CHECKING:
21-
# pylint: disable=unused-import,ungrouped-imports
2222
from azure.core.credentials import TokenCredential
2323

2424

25-
class BatchClient(BatchClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword
25+
class BatchClient(BatchClientOperationsMixin):
2626
"""BatchClient.
2727
2828
:param endpoint: Batch account endpoint (for example:
29-
https://batchaccount.eastus2.batch.azure.com). Required.
29+
`https://batchaccount.eastus2.batch.azure.com
30+
<https://batchaccount.eastus2.batch.azure.com>`_). Required.
3031
:type endpoint: str
3132
:param credential: Credential used to authenticate requests to the service. Required.
3233
:type credential: ~azure.core.credentials.TokenCredential
3334
:keyword api_version: The API version to use for this operation. Default value is
34-
"2024-02-01.19.0". Note that overriding this default value may result in unsupported behavior.
35+
"2024-07-01.20.0". Note that overriding this default value may result in unsupported behavior.
3536
:paramtype api_version: str
3637
"""
3738

@@ -91,7 +92,7 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
9192
def close(self) -> None:
9293
self._client.close()
9394

94-
def __enter__(self) -> "BatchClient":
95+
def __enter__(self) -> Self:
9596
self._client.__enter__()
9697
return self
9798

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
from ._version import VERSION
1414

1515
if TYPE_CHECKING:
16-
# pylint: disable=unused-import,ungrouped-imports
1716
from azure.core.credentials import TokenCredential
1817

1918

@@ -24,17 +23,18 @@ class BatchClientConfiguration: # pylint: disable=too-many-instance-attributes
2423
attributes.
2524
2625
:param endpoint: Batch account endpoint (for example:
27-
https://batchaccount.eastus2.batch.azure.com). Required.
26+
`https://batchaccount.eastus2.batch.azure.com
27+
<https://batchaccount.eastus2.batch.azure.com>`_). Required.
2828
:type endpoint: str
2929
:param credential: Credential used to authenticate requests to the service. Required.
3030
:type credential: ~azure.core.credentials.TokenCredential
3131
:keyword api_version: The API version to use for this operation. Default value is
32-
"2024-02-01.19.0". Note that overriding this default value may result in unsupported behavior.
32+
"2024-07-01.20.0". Note that overriding this default value may result in unsupported behavior.
3333
:paramtype api_version: str
3434
"""
3535

3636
def __init__(self, endpoint: str, credential: "TokenCredential", **kwargs: Any) -> None:
37-
api_version: str = kwargs.pop("api_version", "2024-02-01.19.0")
37+
api_version: str = kwargs.pop("api_version", "2024-07-01.20.0")
3838

3939
if endpoint is None:
4040
raise ValueError("Parameter 'endpoint' must not be None.")

0 commit comments

Comments
 (0)