Skip to content

Commit 353d346

Browse files
committed
pylint
1 parent a36c4f8 commit 353d346

File tree

5 files changed

+5
-7
lines changed

5 files changed

+5
-7
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ def send(self, events: SendType, *, channel_name: Optional[str] = None, **kwargs
237237
raise HttpResponseError(response=response)
238238

239239
def close(self) -> None:
240+
"""Closes the EventGridPublisherClient session."""
240241
self._client.close()
241242

242243
def __enter__(self) -> "EventGridPublisherClient":

sdk/eventhub/azure-eventhub/azure/eventhub/aio/_async_utils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
# --------------------------------------------------------------------------
66
import asyncio # pylint:disable=do-not-import-asyncio
77
import sys
8-
from asyncio import Semaphore # pylint:disable=do-not-import-asyncio
9-
108

119
def get_dict_with_loop_if_needed(loop):
1210
if sys.version_info >= (3, 10):
@@ -17,7 +15,7 @@ def get_dict_with_loop_if_needed(loop):
1715
return {}
1816

1917

20-
async def semaphore_acquire_with_timeout(semaphore: Semaphore, timeout=None):
18+
async def semaphore_acquire_with_timeout(semaphore: asyncio.Semaphore, timeout=None):
2119
try:
2220
return await asyncio.wait_for(semaphore.acquire(), timeout=timeout)
2321
except asyncio.TimeoutError:

sdk/eventhub/azure-eventhub/azure/eventhub/aio/_buffered_producer/_buffered_producer_async.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import logging
88
import queue
99
import time
10-
from asyncio import Lock # pylint:disable=do-not-import-asyncio
1110
from typing import Optional, Callable, Awaitable, TYPE_CHECKING
1211

1312
from .._producer_async import EventHubProducer
@@ -39,7 +38,7 @@ def __init__(
3938
self._max_buffer_len = max_buffer_length
4039
self._cur_buffered_len = 0
4140
self._producer: EventHubProducer = producer
42-
self._lock = Lock()
41+
self._lock = asyncio.Lock()
4342
self._max_wait_time = max_wait_time
4443
self._on_success = self.failsafe_callback(on_success)
4544
self._on_error = self.failsafe_callback(on_error)

sdk/servicebus/azure-servicebus/azure/servicebus/management/_shared_key_policy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class ServiceBusSharedKeyCredentialPolicy(SansIOHTTPPolicy):
1717
:param str name:
1818
"""
1919

20-
def __init__(self, endpoint: str, credential: ServiceBusSharedKeyCredential, name: str):
20+
def __init__(self, endpoint: str, credential: ServiceBusSharedKeyCredential, name: str) -> None:
2121
super(ServiceBusSharedKeyCredentialPolicy, self).__init__()
2222
self._credential = credential
2323
self._endpoint = endpoint

sdk/servicebus/azure-servicebus/azure/servicebus/management/_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ def serialize_rule_key_values(entry_ele, rule_descripiton):
281281

282282

283283
# Helper functions for common parameter validation errors in the client.
284-
def _validate_entity_name_type(entity_name: str, display_name: str ="entity name") -> None:
284+
def _validate_entity_name_type(entity_name: str, display_name: str = "entity name") -> None:
285285
if not isinstance(entity_name, str):
286286
raise TypeError("{} must be a string, not {}".format(display_name, type(entity_name)))
287287

0 commit comments

Comments
 (0)