Skip to content

Commit 30b2807

Browse files
committed
mypy fix
1 parent 5cf6434 commit 30b2807

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

benchmarks/python/python_benchmark.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
import redis.asyncio as redispy # type: ignore
1818
from glide import (
1919
BaseClientConfiguration,
20+
GlideClient,
21+
GlideClusterClient,
2022
Logger,
2123
LogLevel,
2224
NodeAddress,
23-
RedisClient,
24-
RedisClusterClient,
2525
)
2626

2727

@@ -288,7 +288,7 @@ async def main(
288288

289289
if clients_to_run == "all" or clients_to_run == "glide":
290290
# Glide Socket
291-
client_class = RedisClusterClient if is_cluster else RedisClient
291+
client_class = GlideClusterClient if is_cluster else GlideClient
292292
config = BaseClientConfiguration(
293293
[NodeAddress(host=host, port=port)], use_tls=use_tls
294294
)

examples/python/client_example.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
from glide import (
77
AllNodes,
88
BaseClientConfiguration,
9+
GlideClient,
10+
GlideClusterClient,
911
Logger,
1012
LogLevel,
1113
NodeAddress,
12-
RedisClient,
13-
RedisClusterClient,
1414
)
1515

1616

@@ -28,7 +28,7 @@ def set_file_logger(level: LogLevel = LogLevel.WARN, file: Optional[str] = None)
2828
Logger.set_logger_config(level, file)
2929

3030

31-
async def send_set_and_get(client: Union[RedisClient, RedisClusterClient]):
31+
async def send_set_and_get(client: Union[GlideClient, GlideClusterClient]):
3232
set_response = await client.set("foo", "bar")
3333
print(f"Set response is = {set_response}")
3434
get_response = await client.get("foo")
@@ -39,14 +39,14 @@ async def test_standalone_client(host: str = "localhost", port: int = 6379):
3939
# When in Redis is in standalone mode, add address of the primary node,
4040
# and any replicas you'd like to be able to read from.
4141
addresses = [NodeAddress(host, port)]
42-
# Check `RedisClientConfiguration/ClusterClientConfiguration` for additional options.
42+
# Check `GlideClientConfiguration/ClusterClientConfiguration` for additional options.
4343
config = BaseClientConfiguration(
4444
addresses=addresses,
4545
client_name="test_standalone_client",
4646
# if the server use TLS, you'll need to enable it. Otherwise the connection attempt will time out silently.
4747
# use_tls=True
4848
)
49-
client = await RedisClient.create(config)
49+
client = await GlideClient.create(config)
5050

5151
# Send SET and GET
5252
await send_set_and_get(client)
@@ -58,14 +58,14 @@ async def test_standalone_client(host: str = "localhost", port: int = 6379):
5858
async def test_cluster_client(host: str = "localhost", port: int = 6379):
5959
# When in Redis is cluster mode, add address of any nodes, and the client will find all nodes in the cluster.
6060
addresses = [NodeAddress(host, port)]
61-
# Check `RedisClientConfiguration/ClusterClientConfiguration` for additional options.
61+
# Check `GlideClientConfiguration/ClusterClientConfiguration` for additional options.
6262
config = BaseClientConfiguration(
6363
addresses=addresses,
6464
client_name="test_cluster_client",
6565
# if the cluster nodes use TLS, you'll need to enable it. Otherwise the connection attempt will time out silently.
6666
# use_tls=True
6767
)
68-
client = await RedisClusterClient.create(config)
68+
client = await GlideClusterClient.create(config)
6969

7070
# Send SET and GET
7171
await send_set_and_get(client)

python/python/tests/tests_redis_modules/test_json.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from glide.config import ProtocolVersion
1010
from glide.constants import OK
1111
from glide.exceptions import RequestError
12-
from glide.redis_client import TGlideClient
12+
from glide.glide_client import TGlideClient
1313
from tests.test_async_client import get_random_string, parse_info_response
1414

1515

0 commit comments

Comments
 (0)