From 6180fa8cafb7c626c3414a4838124c3d8ae1b239 Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Sun, 19 Sep 2021 23:50:47 +0100 Subject: [PATCH] More precise type for auth_args. --- aioredis/connection.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aioredis/connection.py b/aioredis/connection.py index e6c74596e..93910971b 100644 --- a/aioredis/connection.py +++ b/aioredis/connection.py @@ -754,8 +754,9 @@ async def on_connect(self): # if username and/or password are set, authenticate if self.username or self.password: + auth_args: Union[Tuple[str], Tuple[str, str]] if self.username: - auth_args: Tuple[str, ...] = (self.username, self.password or "") + auth_args = (self.username, self.password or "") else: # Mypy bug: https://github.com/python/mypy/issues/10944 auth_args = (self.password or "",)