diff --git a/scripts/devops_tasks/test_run_samples.py b/scripts/devops_tasks/test_run_samples.py index 26cc5d023434..0894ea943771 100644 --- a/scripts/devops_tasks/test_run_samples.py +++ b/scripts/devops_tasks/test_run_samples.py @@ -93,19 +93,6 @@ "consume_eventgrid_events_from_service_bus_queue.py", "sample_publish_events_to_a_topic_using_sas_credential.py", "sample_publish_events_to_a_topic_using_sas_credential_async.py", - 'sample_publish_operation.py', - 'sample_receive_operation.py', - 'sample_reject_operation.py', - 'sample_eg_client_authentication.py', - 'sample_all_operations.py', - 'sample_release_operation.py', - 'sample_acknowledge_operation.py', - 'sample_publish_operation_async.py', - 'sample_release_operation_async.py', - 'sample_reject_operation_async.py', - 'sample_acknowledge_operation_async.py', - 'sample_receive_operation_async.py', - 'sample_all_operations_async.py' ], "azure-eventhub": [ "client_identity_authentication.py", # TODO: remove after fixing issue #29177 diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_operations/_patch.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_operations/_patch.py index 7b9a22176a7a..5d759bb3216a 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_operations/_patch.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_operations/_patch.py @@ -16,7 +16,6 @@ Optional, TypeVar, Union, - overload, TYPE_CHECKING, ) @@ -28,7 +27,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.core.pipeline import PipelineResponse from azure.core.rest import HttpRequest, HttpResponse -from azure.core.utils import case_insensitive_dict from ._operations import ( EventGridPublisherClientOperationsMixin as PublisherOperationsMixin, @@ -105,8 +103,6 @@ def send( ) -> None: # pylint: disable=docstring-should-be-keyword, docstring-missing-param """Send events to the Event Grid Service. - :param topic_name: The name of the topic to send the event to. - :type topic_name: str :param events: The event to send. :type events: CloudEvent or List[CloudEvent] or Dict[str, Any] or List[Dict[str, Any]] or CNCFCloudEvent or List[CNCFCloudEvent] or EventGridEvent or List[EventGridEvent] @@ -143,24 +139,24 @@ def send( # Try to send via namespace self._publish(self._namespace, _serialize_events(events), **kwargs) except Exception as exception: # pylint: disable=broad-except - self._http_response_error_handler(exception, "Namespaces") + self._http_response_error_handler(exception) raise exception else: kwargs["content_type"] = content_type if content_type else "application/json; charset=utf-8" try: self._publish(events, channel_name=channel_name, **kwargs) except Exception as exception: - self._http_response_error_handler(exception, "Basic") + self._http_response_error_handler(exception) raise exception - def _http_response_error_handler(self, exception, level): + def _http_response_error_handler(self, exception): if isinstance(exception, HttpResponseError): if exception.status_code == 400: raise HttpResponseError("Invalid event data. Please check the data and try again.") from exception if exception.status_code == 404: raise ResourceNotFoundError( "Resource not found. " - f"Please check that the tier you are using, corresponds to the correct " + "Please check that the tier you are using, corresponds to the correct " "endpoint and/or topic name." ) from exception raise exception diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_patch.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_patch.py index 1b7a8b79dc0b..b63baf75804a 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_patch.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_patch.py @@ -132,7 +132,8 @@ def __init__( ) def __repr__(self) -> str: - return f"" + return f"" def patch_sdk(): diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/aio/_operations/_patch.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/aio/_operations/_patch.py index 71e5202a6b72..e856d18de501 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/aio/_operations/_patch.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/aio/_operations/_patch.py @@ -16,7 +16,6 @@ from azure.core.pipeline import PipelineResponse from azure.core.rest import HttpRequest, AsyncHttpResponse from ...models._patch import ReceiveDetails -from ..._operations._patch import use_standard_only from ._operations import ( EventGridPublisherClientOperationsMixin as PublisherOperationsMixin, EventGridConsumerClientOperationsMixin as ConsumerOperationsMixin, @@ -29,7 +28,7 @@ ) from ..._legacy import EventGridEvent -from ..._legacy._helpers import _is_eventgrid_event_format, _from_cncf_events +from ..._legacy._helpers import _is_eventgrid_event_format if sys.version_info >= (3, 9): from collections.abc import MutableMapping @@ -65,8 +64,6 @@ async def send( ) -> None: # pylint: disable=docstring-should-be-keyword, docstring-missing-param """Send events to the Event Grid Service. - :param topic_name: The name of the topic to send the event to. - :type topic_name: str :param events: The event to send. :type events: CloudEvent or List[CloudEvent] or Dict[str, Any] or List[Dict[str, Any]] or CNCFCloudEvent or List[CNCFCloudEvent] or EventGridEvent or List[EventGridEvent] @@ -104,24 +101,24 @@ async def send( # Try to send via namespace await self._publish(self._namespace, _serialize_events(events), **kwargs) except Exception as exception: # pylint: disable=broad-except - self._http_response_error_handler(exception, "Namespaces") + self._http_response_error_handler(exception) raise exception else: kwargs["content_type"] = content_type if content_type else "application/json; charset=utf-8" try: await self._publish(events, channel_name=channel_name, **kwargs) except Exception as exception: - self._http_response_error_handler(exception, "Basic") + self._http_response_error_handler(exception) raise exception - def _http_response_error_handler(self, exception, level): + def _http_response_error_handler(self, exception): if isinstance(exception, HttpResponseError): if exception.status_code == 400: raise HttpResponseError("Invalid event data. Please check the data and try again.") from exception if exception.status_code == 404: raise ResourceNotFoundError( "Resource not found. " - f"Please check that the tier you are using, corresponds to the correct " + "Please check that the tier you are using, corresponds to the correct " "endpoint and/or topic name." ) from exception raise exception diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/aio/_patch.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/aio/_patch.py index c07ebfc3d80d..c82fcc0033d0 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/aio/_patch.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/aio/_patch.py @@ -130,7 +130,8 @@ def __init__( ) def __repr__(self) -> str: - return f"" + return f"" def patch_sdk(): diff --git a/sdk/eventgrid/azure-eventgrid/pyproject.toml b/sdk/eventgrid/azure-eventgrid/pyproject.toml index 1753fb8036e7..ab509fcf3611 100644 --- a/sdk/eventgrid/azure-eventgrid/pyproject.toml +++ b/sdk/eventgrid/azure-eventgrid/pyproject.toml @@ -1,5 +1,3 @@ [tool.azure-sdk-build] pyright = false -verifytypes = false -strict_sphinx = false -pylint = false \ No newline at end of file +verifytypes = false \ No newline at end of file