Skip to content

Conversation

@bsbodden
Copy link
Contributor

No description provided.

The redis-py library has incorrect type annotations for JSON commands:
- `json().get()` is typed as returning `List[JsonType]` but returns `JsonType`
- Async `json().set()`/`json().get()` are typed as non-awaitable

These typing issues manifest differently across Python versions (3.10-3.13),
causing CI failures while passing locally.

Changes:
- Disable `warn_unused_ignores` in mypy config for cross-version compatibility
- Add `cast()` for `json().get()` results where dict access is needed
- Add `# type: ignore[misc]` for async JSON operations
@bsbodden bsbodden merged commit ff68117 into main Dec 20, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants