mirror of
https://github.com/zulip/zulip.git
synced 2025-10-26 01:24:02 +00:00
python: Reformat with Black, except quotes.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
5028c081cb
commit
11741543da
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user