Skip to content

Commit 34412f1

Browse files
author
SDKAuto
committed
CodeGen from PR 32768 in Azure/azure-rest-api-specs
Merge a345101368965a6faab97f377f46b989868776dd into bbdbd8545dedd6436b8e30efe45270367389a9b6
1 parent b27efc9 commit 34412f1

File tree

128 files changed

+17788
-55713
lines changed

Some content is hidden

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

128 files changed

+17788
-55713
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": "0a6ab8bcaac7886b1a968df9bacb5962864eee00",
3+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4+
"typespec_src": "specification/batch/Azure.Batch",
5+
"@azure-tools/typespec-python": "0.38.4"
6+
}

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

Lines changed: 274 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: 4 additions & 4 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,11 +19,10 @@
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:
@@ -31,7 +31,7 @@ class BatchClient(BatchClientOperationsMixin): # pylint: disable=client-accepts
3131
:param credential: Credential used to authenticate requests to the service. Required.
3232
:type credential: ~azure.core.credentials.TokenCredential
3333
: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.
34+
"2024-07-01.20.0". Note that overriding this default value may result in unsupported behavior.
3535
:paramtype api_version: str
3636
"""
3737

@@ -91,7 +91,7 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
9191
def close(self) -> None:
9292
self._client.close()
9393

94-
def __enter__(self) -> "BatchClient":
94+
def __enter__(self) -> Self:
9595
self._client.__enter__()
9696
return self
9797

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

Lines changed: 2 additions & 3 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

@@ -29,12 +28,12 @@ class BatchClientConfiguration: # pylint: disable=too-many-instance-attributes
2928
:param credential: Credential used to authenticate requests to the service. Required.
3029
:type credential: ~azure.core.credentials.TokenCredential
3130
: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.
31+
"2024-07-01.20.0". Note that overriding this default value may result in unsupported behavior.
3332
:paramtype api_version: str
3433
"""
3534

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

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

0 commit comments

Comments
 (0)