Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

Commit

Permalink
More precise type for auth_args.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamsorcerer committed Sep 19, 2021
1 parent e78801b commit 6180fa8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion aioredis/connection.py
Expand Up @@ -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 "",)
Expand Down

0 comments on commit 6180fa8

Please sign in to comment.