Skip to content

Commit c685248

Browse files
committed
Fixed imports codestyle
1 parent a78690a commit c685248

File tree

6 files changed

+10
-5
lines changed

6 files changed

+10
-5
lines changed

redis/cache.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from abc import ABC, abstractmethod
22
from enum import Enum
3-
from cachetools import LRUCache, LFUCache, RRCache, Cache, TTLCache
3+
4+
from cachetools import Cache, LFUCache, LRUCache, RRCache, TTLCache
45

56

67
class EvictionPolicy(Enum):

redis/client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import warnings
66
from itertools import chain
77
from typing import Any, Callable, Dict, List, Optional, Type, Union
8+
89
from cachetools import Cache
910
from redis._parsers.encoders import Encoder
1011
from redis._parsers.helpers import (

redis/cluster.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import time
66
from collections import OrderedDict
77
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
8+
89
from cachetools import Cache
910
from redis._parsers import CommandsParser, Encoder
1011
from redis._parsers.helpers import parse_scan

redis/retry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
Any,
77
Callable,
88
Iterable,
9+
Optional,
910
Tuple,
1011
Type,
1112
TypeVar,
12-
Optional,
1313
)
1414

1515
from redis.exceptions import ConnectionError, TimeoutError

tests/conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@
55
from unittest import mock
66
from unittest.mock import Mock
77
from urllib.parse import urlparse
8+
89
import pytest
910
import redis
1011
from packaging.version import Version
1112
from redis import Sentinel
1213
from redis.backoff import NoBackoff
13-
from redis.connection import Connection, parse_url, SSLConnection
14+
from redis.connection import Connection, SSLConnection, parse_url
1415
from redis.exceptions import RedisClusterException
1516
from redis.retry import Retry
1617
from tests.ssl_utils import get_ssl_filename

tests/test_cache.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import threading
22
import time
3+
34
import pytest
4-
from cachetools import TTLCache, LRUCache, LFUCache
55
import redis
6-
from redis.cache import EvictionPolicy, CacheClass
6+
from cachetools import LFUCache, LRUCache, TTLCache
7+
from redis.cache import CacheClass, EvictionPolicy
78
from redis.utils import HIREDIS_AVAILABLE
89
from tests.conftest import _get_client, skip_if_resp_version
910

0 commit comments

Comments
 (0)