Skip to content

Commit b943fe4

Browse files
authored
Update deps (#44)
* Update deps * Update deps * Update deps * Update deps
1 parent 3cf372e commit b943fe4

File tree

6 files changed

+192
-198
lines changed

6 files changed

+192
-198
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
python-version: ['3.7', '3.8', '3.9']
20+
python-version: ['3.7', '3.8', '3.9', '3.10']
2121
env-type: ['dev', 'redis', 'aioredis']
2222

2323
steps:
@@ -38,7 +38,7 @@ jobs:
3838
- name: Install dependencies
3939
run: |
4040
poetry config virtualenvs.in-project true
41-
poetry run pip install -U pip 'setuptools<60.9'
41+
poetry run pip install -U pip
4242
poetry install --extras=${{ matrix.env-type }}
4343
4444
- name: Pull and build docker-compose services
@@ -60,6 +60,6 @@ jobs:
6060
# Upload coverage to codecov: https://codecov.io/
6161
- name: Upload coverage to Codecov
6262
uses: codecov/codecov-action@v3
63-
if: ${{ matrix.env-type == 'dev' }}
63+
if: ${{ matrix.python-version == '3.9' && matrix.env-type == 'dev' }}
6464
with:
6565
file: ./coverage.xml

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ SHELL:=/usr/bin/env bash
33
.PHONY: lint
44
lint:
55
poetry run mypy .
6-
-poetry run flake8 .
6+
poetry run flake8 .
77

88
.PHONY: unit
99
unit:

asyncio_redis_rate_limit/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ async def _acquire(self) -> None:
9696

9797
async with self._lock:
9898
current_rate = await self._run_pipeline(cache_key, pipeline)
99-
if current_rate > self._rate_spec.requests:
99+
# This looks like a coverage error on 3.10:
100+
if current_rate > self._rate_spec.requests: # pragma: no cover
100101
raise RateLimitError('Rate limit is hit', current_rate)
101102

102103
async def _run_pipeline(
@@ -119,7 +120,7 @@ def _make_cache_key(
119120
cache_prefix: str,
120121
) -> str:
121122
parts = ''.join([unique_key, str(rate_spec)])
122-
return cache_prefix + hashlib.md5( # noqa: S303
123+
return cache_prefix + hashlib.md5( # noqa: S303, S324
123124
parts.encode('utf-8'),
124125
).hexdigest()
125126

0 commit comments

Comments
 (0)