-
Notifications
You must be signed in to change notification settings - Fork 53
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
Python: Allow chaining function calls on transaction #987
Python: Allow chaining function calls on transaction #987
Conversation
|
||
@pytest.mark.parametrize("cluster_mode", [True, False]) | ||
@pytest.mark.parametrize("protocol", [ProtocolVersion.RESP2, ProtocolVersion.RESP3]) | ||
async def test_transaction_chaning_calls(self, redis_client: TRedisClient): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't need to write a test to handle this. Just change the existing transaction test to use chaining.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the current one cant use chaining because we modified it to be more readable
@@ -14,6 +14,8 @@ | |||
) | |||
from glide.protobuf.redis_request_pb2 import RequestType | |||
|
|||
T = TypeVar("T", bound="BaseTransaction") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor:
change T to TTransaction
TTransaction = TypeVar("TTransaction", bound="BaseTransaction")
|
||
@pytest.mark.parametrize("cluster_mode", [True, False]) | ||
@pytest.mark.parametrize("protocol", [ProtocolVersion.RESP2, ProtocolVersion.RESP3]) | ||
async def test_transaction_chaning_calls(self, redis_client: TRedisClient): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chaning => chaining
733d7ec
to
7ebce77
Compare
7ebce77
to
731eb9d
Compare
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.