docs: add missing __aenter__/__aexit__ docstrings

Signed-off-by: disqualifier <dev@disqualifier.me>
This commit is contained in:
2026-07-03 16:47:33 -04:00
parent ea1e3620e6
commit 52864e513a
4 changed files with 7 additions and 5 deletions
+3 -3
View File
@@ -14,19 +14,19 @@ datastore trio (`redis` / `psql` / `mysql`), a sibling of the `mongo` lib.
`requirements.txt`: `requirements.txt`:
``` ```
redis_store @ git+ssh://git@git.rethinkstudios.io/rethink-public/redis.git@v0.2.0 redis_store @ git+ssh://git@git.rethinkstudios.io/rethink-public/redis.git@v0.2.1
``` ```
Direct: Direct:
```bash ```bash
pip install "redis_store @ git+ssh://git@git.rethinkstudios.io/rethink-public/redis.git@v0.2.0" pip install "redis_store @ git+ssh://git@git.rethinkstudios.io/rethink-public/redis.git@v0.2.1"
``` ```
Pulls `redis>=5.0.1` (redis-py, which ships the asyncio client — **not** the dead standalone Pulls `redis>=5.0.1` (redis-py, which ships the asyncio client — **not** the dead standalone
`aioredis`; `5.0.1` is the floor because `5.0.0` lacks the async client's `aclose()`). `aioredis`; `5.0.1` is the floor because `5.0.0` lacks the async client's `aclose()`).
Drop the `@v0.2.0` suffix from the line above to install the latest unpinned. Drop the `@v0.2.1` suffix from the line above to install the latest unpinned.
## Usage ## Usage
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
[project] [project]
name = "redis_store" name = "redis_store"
version = "0.2.0" version = "0.2.1"
description = "async redis wrapper over redis-py asyncio with a raw escape hatch, fail-loud and config-free" description = "async redis wrapper over redis-py asyncio with a raw escape hatch, fail-loud and config-free"
requires-python = ">=3.10" requires-python = ">=3.10"
dependencies = [ dependencies = [
+1 -1
View File
@@ -1,5 +1,5 @@
from .redis_store import RedisDB from .redis_store import RedisDB
__version__ = "0.2.0" __version__ = "0.2.1"
__all__ = ["RedisDB", "__version__"] __all__ = ["RedisDB", "__version__"]
+2
View File
@@ -108,9 +108,11 @@ class RedisDB:
raise raise
async def __aenter__(self) -> "RedisDB": async def __aenter__(self) -> "RedisDB":
"""enter: connect() and return self"""
return await self.connect() return await self.connect()
async def __aexit__(self, exc_type, exc, tb) -> None: async def __aexit__(self, exc_type, exc, tb) -> None:
"""exit: close(), ignoring exc_type/exc/tb"""
await self.close() await self.close()
@property @property