Skip to content

Commit 91cc9c9

Browse files
author
SDKAuto
committed
CodeGen from PR 31719 in Azure/azure-rest-api-specs
Merge ad01059895cd469c4f7bbb4b0b3c513df89a8d45 into d0c3a661b6478798a1b028d4ddbb4633f634e808
1 parent 035ee80 commit 91cc9c9

Some content is hidden

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

60 files changed

+935
-6950
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"commit": "a74ef60f0619ed89225433a191947386e9b525bd",
3+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4+
"typespec_src": "specification/eventgrid/Azure.Messaging.EventGrid",
5+
"@azure-tools/typespec-python": "0.36.5"
6+
}

sdk/eventgrid/azure-eventgrid/azure/eventgrid/__init__.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,22 @@
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 ._patch import EventGridPublisherClient
10-
from ._patch import EventGridConsumerClient
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 EventGridPublisherClient # type: ignore
16+
from ._client import EventGridConsumerClient # type: ignore
1117
from ._version import VERSION
1218

1319
__version__ = VERSION
1420

1521
try:
1622
from ._patch import __all__ as _patch_all
17-
from ._patch import * # pylint: disable=unused-wildcard-import
23+
from ._patch import *
1824
except ImportError:
1925
_patch_all = []
2026
from ._patch import patch_sdk as _patch_sdk
@@ -23,6 +29,6 @@
2329
"EventGridPublisherClient",
2430
"EventGridConsumerClient",
2531
]
26-
__all__.extend([p for p in _patch_all if p not in __all__])
32+
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
2733

2834
_patch_sdk()

sdk/eventgrid/azure-eventgrid/azure/eventgrid/_client.py

Lines changed: 5 additions & 9 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, Union
11+
from typing_extensions import Self
1112

1213
from azure.core import PipelineClient
1314
from azure.core.credentials import AzureKeyCredential
@@ -19,13 +20,10 @@
1920
from ._serialization import Deserializer, Serializer
2021

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

2525

26-
class EventGridPublisherClient(
27-
EventGridPublisherClientOperationsMixin
28-
): # pylint: disable=client-accepts-api-version-keyword
26+
class EventGridPublisherClient(EventGridPublisherClientOperationsMixin):
2927
"""EventGridPublisherClient.
3028
3129
:param endpoint: The host name of the namespace, e.g.
@@ -95,17 +93,15 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
9593
def close(self) -> None:
9694
self._client.close()
9795

98-
def __enter__(self) -> "EventGridPublisherClient":
96+
def __enter__(self) -> Self:
9997
self._client.__enter__()
10098
return self
10199

102100
def __exit__(self, *exc_details: Any) -> None:
103101
self._client.__exit__(*exc_details)
104102

105103

106-
class EventGridConsumerClient(
107-
EventGridConsumerClientOperationsMixin
108-
): # pylint: disable=client-accepts-api-version-keyword
104+
class EventGridConsumerClient(EventGridConsumerClientOperationsMixin):
109105
"""EventGridConsumerClient.
110106
111107
:param endpoint: The host name of the namespace, e.g.
@@ -175,7 +171,7 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
175171
def close(self) -> None:
176172
self._client.close()
177173

178-
def __enter__(self) -> "EventGridConsumerClient":
174+
def __enter__(self) -> Self:
179175
self._client.__enter__()
180176
return self
181177

sdk/eventgrid/azure-eventgrid/azure/eventgrid/_configuration.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414
from ._version import VERSION
1515

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

2019

21-
class EventGridPublisherClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
20+
class EventGridPublisherClientConfiguration: # pylint: disable=too-many-instance-attributes
2221
"""Configuration for EventGridPublisherClient.
2322
2423
Note that all parameters used to create this instance are saved as instance
@@ -75,7 +74,7 @@ def _configure(self, **kwargs: Any) -> None:
7574
self.authentication_policy = self._infer_policy(**kwargs)
7675

7776

78-
class EventGridConsumerClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
77+
class EventGridConsumerClientConfiguration: # pylint: disable=too-many-instance-attributes
7978
"""Configuration for EventGridConsumerClient.
8079
8180
Note that all parameters used to create this instance are saved as instance

sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/__init__.py

Lines changed: 0 additions & 19 deletions
This file was deleted.

sdk/eventgrid/azure-eventgrid/azure/eventgrid/_legacy/_constants.py

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)