diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 87a942217..d8177b08d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,25 +7,25 @@ repos: entry: ./tools/check_changes.py pass_filenames: false - repo: https://github.com/pre-commit/pre-commit-hooks - rev: 'v4.1.0' + rev: 'v4.4.0' hooks: - id: check-merge-conflict - repo: https://github.com/asottile/yesqa - rev: v1.3.0 + rev: v1.4.0 hooks: - id: yesqa - repo: https://github.com/pycqa/isort - rev: '5.10.1' + rev: '5.12.0' hooks: - id: isort args: ["--profile", "black"] - repo: https://github.com/psf/black - rev: '22.1.0' + rev: '23.1.0' hooks: - id: black language_version: python3 # Should be a command that runs python3.6+ - repo: https://github.com/pre-commit/pre-commit-hooks - rev: 'v4.1.0' + rev: 'v4.4.0' hooks: - id: end-of-file-fixer exclude: >- @@ -55,17 +55,17 @@ repos: - id: detect-private-key exclude: ^examples|(?:tests/ssl)/ - repo: https://github.com/asottile/pyupgrade - rev: 'v2.31.0' + rev: 'v3.3.1' hooks: - id: pyupgrade args: ['--py36-plus', '--keep-mock'] - repo: https://github.com/PyCQA/flake8 - rev: '4.0.1' + rev: '6.0.0' hooks: - id: flake8 exclude: "^docs/" -- repo: git://github.com/Lucas-C/pre-commit-hooks-markup +- repo: https://github.com/Lucas-C/pre-commit-hooks-markup rev: v1.0.1 hooks: - id: rst-linter diff --git a/aioredis/connection.py b/aioredis/connection.py index 928671f04..067dcf204 100644 --- a/aioredis/connection.py +++ b/aioredis/connection.py @@ -1541,7 +1541,6 @@ def __init__( queue_class: Type[asyncio.Queue] = asyncio.LifoQueue, **connection_kwargs, ): - self.queue_class = queue_class self.timeout = timeout self._connections: List[Connection] diff --git a/docs/examples/getting_started/03_multiexec.py b/docs/examples/getting_started/03_multiexec.py index eb03ae4b5..5149a6a12 100644 --- a/docs/examples/getting_started/03_multiexec.py +++ b/docs/examples/getting_started/03_multiexec.py @@ -6,7 +6,7 @@ async def main(): redis = await aioredis.from_url("redis://localhost") async with redis.pipeline(transaction=True) as pipe: - ok1, ok2 = await (pipe.set("key1", "value1").set("key2", "value2").execute()) + ok1, ok2 = await pipe.set("key1", "value1").set("key2", "value2").execute() assert ok1 assert ok2 diff --git a/tests/conftest.py b/tests/conftest.py index 3beef2eb1..ba3fdb200 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -43,7 +43,6 @@ def __init__( help=None, metavar=None, ): - _option_strings = [] for option_string in option_strings: _option_strings.append(option_string) diff --git a/tests/test_lock.py b/tests/test_lock.py index d8f933695..57f40bc70 100644 --- a/tests/test_lock.py +++ b/tests/test_lock.py @@ -227,7 +227,6 @@ class TestLockClassSelection: def test_lock_class_argument(self, r): class MyLock: def __init__(self, *args, **kwargs): - pass lock = r.lock("foo", lock_class=MyLock) diff --git a/tests/test_pubsub.py b/tests/test_pubsub.py index 85c004659..8b7aef790 100644 --- a/tests/test_pubsub.py +++ b/tests/test_pubsub.py @@ -89,7 +89,6 @@ async def test_pattern_subscribe_unsubscribe(self, r): async def _test_resubscribe_on_reconnection( self, p, sub_type, unsub_type, sub_func, unsub_func, keys ): - for key in keys: assert await sub_func(key) is None @@ -131,7 +130,6 @@ async def test_resubscribe_to_patterns_on_reconnection(self, r): async def _test_subscribed_property( self, p, sub_type, unsub_type, sub_func, unsub_func, keys ): - assert p.subscribed is False await sub_func(keys[0]) # we're now subscribed even though we haven't processed the diff --git a/tests/test_sentinel.py b/tests/test_sentinel.py index 28d9f9f55..d775cd6ac 100644 --- a/tests/test_sentinel.py +++ b/tests/test_sentinel.py @@ -67,7 +67,6 @@ def client(self, host, port, **kwargs): @pytest.fixture() async def cluster(master_ip): - cluster = SentinelTestCluster(ip=master_ip) saved_Redis = aioredis.sentinel.Redis aioredis.sentinel.Redis = cluster.client