upstash / redis-py

HTTP based Python Redis Client for Serverless and Edge Functions
https://docs.upstash.com/redis
MIT License
29 stars 3 forks source link

Enable mypy checks #27

Closed mdumandag closed 1 year ago

mdumandag commented 1 year ago

This PR either fixes or ignores the mypy errors, and adds the py.typed file to the SDK to mark it as properly type hinted package.

While fixing the type errors in the http package, I have also improved the error handling and made it similar to the behavior of the TS SDK: We only retry in case of the errors thrown while the post request. We no longer retry in case the server returns an error response.

I will rebase this PR after merging #26