Skip to content

Commit a8470ce

Browse files
committed
fix: lint error
1 parent 79a4321 commit a8470ce

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

src/socketio/async_redis_manager.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
valkey = None
2121
ValkeyError = None
2222

23-
24-
2523
from .async_pubsub_manager import AsyncPubSubManager
2624
from .redis_manager import parse_redis_sentinel_url
2725

@@ -59,7 +57,8 @@ def __init__(self, url='redis://localhost:6379/0', channel='socketio',
5957
write_only=False, logger=None, redis_options=None):
6058
if aioredis is None and valkey is None:
6159
raise RuntimeError('Redis package is not installed '
62-
'(Run "pip install redis" or "pip install valkey" '
60+
'(Run "pip install redis" or '
61+
'"pip install valkey" '
6362
'in your virtualenv).')
6463
if aioredis and not hasattr(aioredis.Redis, 'from_url'):
6564
raise RuntimeError('Version 2 of aioredis package is required.')
@@ -74,12 +73,14 @@ def _get_redis_module_and_error(self):
7473
if schema == 'redis':
7574
if aioredis is None or RedisError is None:
7675
raise RuntimeError('Redis package is not installed '
77-
'(Run "pip install redis" in your virtualenv).')
76+
'(Run "pip install redis" '
77+
'in your virtualenv).')
7878
return aioredis, RedisError
7979
if schema == 'valkey':
8080
if valkey is None or ValkeyError is None:
8181
raise RuntimeError('Valkey package is not installed '
82-
'(Run "pip install valkey" in your virtualenv).')
82+
'(Run "pip install valkey" '
83+
'in your virtualenv).')
8384
return valkey, ValkeyError
8485
error_msg = f'Unsupported Redis URL schema: {schema}'
8586
raise ValueError(error_msg)

src/socketio/redis_manager.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ def __init__(self, url='redis://localhost:6379/0', channel='socketio',
8282
write_only=False, logger=None, redis_options=None):
8383
if redis is None and valkey is None:
8484
raise RuntimeError('Redis package is not installed '
85-
'(Run "pip install redis" or "pip install valkey" '
85+
'(Run "pip install redis" '
86+
'or "pip install valkey" '
8687
'in your virtualenv).')
8788
super().__init__(channel=channel, write_only=write_only, logger=logger)
8889
self.redis_url = url
@@ -110,12 +111,14 @@ def _get_redis_module_and_error(self):
110111
if schema == 'redis':
111112
if redis is None or RedisError is None:
112113
raise RuntimeError('Redis package is not installed '
113-
'(Run "pip install redis" in your virtualenv).')
114+
'(Run "pip install redis" '
115+
'in your virtualenv).')
114116
return redis, RedisError
115117
if schema == 'valkey':
116118
if valkey is None or ValkeyError is None:
117119
raise RuntimeError('Valkey package is not installed '
118-
'(Run "pip install valkey" in your virtualenv).')
120+
'(Run "pip install valkey" '
121+
'in your virtualenv).')
119122
return valkey, ValkeyError
120123
error_msg = f'Unsupported Redis URL schema: {schema}'
121124
raise ValueError(error_msg)

0 commit comments

Comments
 (0)