python: Reformat with Black, except quotes.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2021-02-11 23:19:30 -08:00
committed by Tim Abbott
parent 5028c081cb
commit 11741543da
817 changed files with 44952 additions and 24860 deletions

View File

@@ -7,16 +7,19 @@ from zerver.models import UserStatus
def get_user_info_dict(realm_id: int) -> Dict[str, Dict[str, Any]]:
rows = UserStatus.objects.filter(
user_profile__realm_id=realm_id,
user_profile__is_active=True,
).exclude(
Q(status=UserStatus.NORMAL) &
Q(status_text=''),
).values(
'user_profile_id',
'status',
'status_text',
rows = (
UserStatus.objects.filter(
user_profile__realm_id=realm_id,
user_profile__is_active=True,
)
.exclude(
Q(status=UserStatus.NORMAL) & Q(status_text=''),
)
.values(
'user_profile_id',
'status',
'status_text',
)
)
user_dict: Dict[str, Dict[str, Any]] = {}
@@ -35,10 +38,10 @@ def get_user_info_dict(realm_id: int) -> Dict[str, Dict[str, Any]]:
return user_dict
def update_user_status(user_profile_id: int,
status: Optional[int],
status_text: Optional[str],
client_id: int) -> None:
def update_user_status(
user_profile_id: int, status: Optional[int], status_text: Optional[str], client_id: int
) -> None:
timestamp = timezone_now()