Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redis backend style refactor #23

Conversation

RamiAwar
Copy link
Contributor

@RamiAwar RamiAwar commented Aug 9, 2022

  • Replaced asserts with if statements (Asserts will be removed if Python app compiled with optimization flags. Should use if statements instead.)

  • Refactored relative imports into absolute (Path is pretty short, no reason not to use absolute imports.)

Asserts will be removed if Python app compiled with optimization flags. Should use if statements instead.
Path is pretty short, no reason not to use absolute imports.
self._serializer = serializer or JsonSerializer()
self._connection: aioredis.Redis = connection or aioredis.from_url(url) # type: ignore[no-untyped-call]
if redis_key_func:
assert callable(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

@alex-oleshkevich alex-oleshkevich merged commit 2897202 into alex-oleshkevich:master Aug 9, 2022
@RamiAwar RamiAwar deleted the redis_backend_style_refactor branch August 9, 2022 18:53
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.

None yet

2 participants