Skip to content

Commit 4ac33b8

Browse files
committed
fix for lint check of valkey inst and test code
1 parent 6a1c5ef commit 4ac33b8

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

instrumentation/opentelemetry-instrumentation-valkey/src/opentelemetry/instrumentation/valkey/__init__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ def response_hook(span, instance, response):
9696
from typing import TYPE_CHECKING, Any, Callable, Collection
9797

9898
import valkey
99+
import valkey.asyncio
99100
from wrapt import wrap_function_wrapper
100101

101102
from opentelemetry import trace
@@ -146,10 +147,6 @@ def response_hook(span, instance, response):
146147

147148

148149
_DEFAULT_SERVICE = "valkey"
149-
150-
151-
import valkey.asyncio
152-
153150
_FIELD_TYPES = ["NUMERIC", "TEXT", "GEO", "TAG", "VECTOR"]
154151

155152

instrumentation/opentelemetry-instrumentation-valkey/tests/test_valkey.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,11 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414
import asyncio
15-
from unittest import IsolatedAsyncioTestCase, mock
15+
from unittest import mock
1616
from unittest.mock import AsyncMock
1717

18-
import pytest
1918
import valkey
2019
import valkey.asyncio
21-
from valkey.exceptions import ConnectionError as valkey_ConnectionError
22-
from redis.exceptions import ConnectionError as redis_ConnectionError
23-
from valkey.exceptions import WatchError
2420

2521
from opentelemetry import trace
2622
from opentelemetry.instrumentation.valkey import ValkeyInstrumentor
@@ -314,4 +310,3 @@ def test_attributes_unix_socket(self):
314310
span.attributes[SpanAttributes.NET_TRANSPORT],
315311
NetTransportValues.OTHER.value,
316312
)
317-

0 commit comments

Comments
 (0)