Skip to content

Commit

Permalink
Typing Update for DataMap sdk pyright upgrade (Azure#39408)
Browse files Browse the repository at this point in the history
* Regenerated sdk with new tsp location

* Removed unnecessary files
  • Loading branch information
parthmiglani-microsoft authored Jan 27, 2025
1 parent 770bb3c commit 319a262
Show file tree
Hide file tree
Showing 20 changed files with 2,804 additions and 73,804 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,28 @@
# Code generated by Microsoft (R) Python Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
# pylint: disable=wrong-import-position

from ._client import DataMapClient
from typing import TYPE_CHECKING

if TYPE_CHECKING:
from ._patch import * # pylint: disable=unused-wildcard-import

from ._client import DataMapClient # type: ignore
from ._version import VERSION

__version__ = VERSION

try:
from ._patch import __all__ as _patch_all
from ._patch import * # pylint: disable=unused-wildcard-import
from ._patch import *
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk

__all__ = [
"DataMapClient",
]
__all__.extend([p for p in _patch_all if p not in __all__])
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore

_patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from copy import deepcopy
from typing import Any, TYPE_CHECKING
from typing_extensions import Self

from azure.core import PipelineClient
from azure.core.pipeline import policies
Expand All @@ -25,11 +26,10 @@
)

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


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

def __enter__(self) -> "DataMapClient":
def __enter__(self) -> Self:
self._client.__enter__()
return self

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from ._version import VERSION

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


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

0 comments on commit 319a262

Please sign in to comment.