Skip to content

Commit a0896e3

Browse files
Merge pull request #333 from microsoft/dev
Merging a lot from dev to main
2 parents 5937cbc + 72edb26 commit a0896e3

File tree

176 files changed

+22128
-16008
lines changed

Some content is hidden

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

176 files changed

+22128
-16008
lines changed

client/tc/azext_tc/vendored_sdks/teamcloud/__init__.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,14 @@
77
# --------------------------------------------------------------------------
88

99
from ._team_cloud_client import TeamCloudClient
10+
11+
try:
12+
from ._patch import __all__ as _patch_all
13+
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
14+
except ImportError:
15+
_patch_all = []
16+
from ._patch import patch_sdk as _patch_sdk
1017
__all__ = ['TeamCloudClient']
18+
__all__.extend([p for p in _patch_all if p not in __all__])
1119

12-
# `._patch.py` is used for handwritten extensions to the generated code
13-
# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
14-
from ._patch import patch_sdk
15-
patch_sdk()
20+
_patch_sdk()

client/tc/azext_tc/vendored_sdks/teamcloud/_team_cloud_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class TeamCloudClient(TeamCloudClientOperationsMixin):
2929
3030
:param credential: Credential needed for the client to connect to Azure.
3131
:type credential: ~azure.core.credentials.TokenCredential
32-
:param base_url: Service URL. Default value is ''.
32+
:param base_url: Service URL. Default value is "".
3333
:type base_url: str
3434
"""
3535

client/tc/azext_tc/vendored_sdks/teamcloud/aio/__init__.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,14 @@
77
# --------------------------------------------------------------------------
88

99
from ._team_cloud_client import TeamCloudClient
10+
11+
try:
12+
from ._patch import __all__ as _patch_all
13+
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
14+
except ImportError:
15+
_patch_all = []
16+
from ._patch import patch_sdk as _patch_sdk
1017
__all__ = ['TeamCloudClient']
18+
__all__.extend([p for p in _patch_all if p not in __all__])
1119

12-
# `._patch.py` is used for handwritten extensions to the generated code
13-
# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
14-
from ._patch import patch_sdk
15-
patch_sdk()
20+
_patch_sdk()

client/tc/azext_tc/vendored_sdks/teamcloud/aio/_team_cloud_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class TeamCloudClient(TeamCloudClientOperationsMixin):
2727
2828
:param credential: Credential needed for the client to connect to Azure.
2929
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
30-
:param base_url: Service URL. Default value is ''.
30+
:param base_url: Service URL. Default value is "".
3131
:type base_url: str
3232
"""
3333

client/tc/azext_tc/vendored_sdks/teamcloud/aio/operations/__init__.py

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

99
from ._team_cloud_client_operations import TeamCloudClientOperationsMixin
1010

11+
from ._patch import __all__ as _patch_all
12+
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
13+
from ._patch import patch_sdk as _patch_sdk
1114
__all__ = [
1215
'TeamCloudClientOperationsMixin',
1316
]
17+
__all__.extend([p for p in _patch_all if p not in __all__])
18+
_patch_sdk()
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# ------------------------------------
2+
# Copyright (c) Microsoft Corporation.
3+
# Licensed under the MIT License.
4+
# ------------------------------------
5+
"""Customize generated code here.
6+
7+
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
8+
"""
9+
from typing import TYPE_CHECKING
10+
11+
if TYPE_CHECKING:
12+
# pylint: disable=unused-import,ungrouped-imports
13+
from typing import List
14+
15+
__all__ = [] # type: List[str] # Add all objects you want publicly available to users at this package level
16+
17+
def patch_sdk():
18+
"""Do not remove from this file.
19+
20+
`patch_sdk` is a last resort escape hatch that allows you to do customizations
21+
you can't accomplish using the techniques described in
22+
https://aka.ms/azsdk/python/dpcodegen/python/customize
23+
"""

0 commit comments

Comments
 (0)