CERT-Polska / karton

Distributed malware processing framework based on Python, Redis and S3.
https://karton-core.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
387 stars 45 forks source link

CI: Fix typing after redis-py v5.0.0 release #227

Open psrok1 opened 1 year ago

psrok1 commented 1 year ago

redis-py v5.0.0 adds support for asyncio. It affected return types from command methods which are now Union[Awaitable[T], T]. As the type doesn't really have sense (Awaitable types are returned only if we use Redis class from redis.asyncio package), it's difficult to pass returned values to other typed methods.

I have added temporary workaround for that by dropping the version to <5.0.0 for linting step (https://github.com/CERT-Polska/karton/pull/226) but we need to fix it somehow.