Skip to content

Commit 319a262

Browse files
Typing Update for DataMap sdk pyright upgrade (#39408)
* Regenerated sdk with new tsp location * Removed unnecessary files
1 parent 770bb3c commit 319a262

20 files changed

+2804
-73804
lines changed

sdk/purview/azure-purview-datamap/azure/purview/datamap/__init__.py

+9-3
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 DataMapClient
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 DataMapClient # 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
"DataMapClient",
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/purview/azure-purview-datamap/azure/purview/datamap/_client.py

+4-4
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
@@ -25,11 +26,10 @@
2526
)
2627

2728
if TYPE_CHECKING:
28-
# pylint: disable=unused-import,ungrouped-imports
2929
from azure.core.credentials import TokenCredential
3030

3131

32-
class DataMapClient: # pylint: disable=client-accepts-api-version-keyword
32+
class DataMapClient:
3333
"""DataMapClient.
3434
3535
:ivar entity: EntityOperations operations
@@ -46,7 +46,7 @@ class DataMapClient: # pylint: disable=client-accepts-api-version-keyword
4646
:vartype type_definition: azure.purview.datamap.operations.TypeDefinitionOperations
4747
:param endpoint: Required.
4848
:type endpoint: str
49-
:param credential: Credential needed for the client to connect to Azure. Required.
49+
:param credential: Credential used to authenticate requests to the service. Required.
5050
:type credential: ~azure.core.credentials.TokenCredential
5151
:keyword api_version: The API version to use for this operation. Known values are "2023-09-01"
5252
and None. Default value is "2023-09-01". Note that overriding this default value may result in
@@ -115,7 +115,7 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
115115
def close(self) -> None:
116116
self._client.close()
117117

118-
def __enter__(self) -> "DataMapClient":
118+
def __enter__(self) -> Self:
119119
self._client.__enter__()
120120
return self
121121

sdk/purview/azure-purview-datamap/azure/purview/datamap/_configuration.py

+1-2
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

@@ -25,7 +24,7 @@ class DataMapClientConfiguration: # pylint: disable=too-many-instance-attribute
2524
2625
:param endpoint: Required.
2726
:type endpoint: str
28-
:param credential: Credential needed for the client to connect to Azure. Required.
27+
:param credential: Credential used to authenticate requests to the service. Required.
2928
:type credential: ~azure.core.credentials.TokenCredential
3029
:keyword api_version: The API version to use for this operation. Known values are "2023-09-01"
3130
and None. Default value is "2023-09-01". Note that overriding this default value may result in

0 commit comments

Comments
 (0)