mirror of https://github.com/zulip/zulip.git
python: Rewrite list() as [].
Suggested by the flake8-comprehensions plugin. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
a276eefcfe
commit
02725d32dd
|
@ -1139,7 +1139,7 @@ def get_incoming_message_ids(import_dir: Path,
|
||||||
'''
|
'''
|
||||||
|
|
||||||
if sort_by_date:
|
if sort_by_date:
|
||||||
tups: List[Tuple[int, int]] = list()
|
tups: List[Tuple[int, int]] = []
|
||||||
else:
|
else:
|
||||||
message_ids: List[int] = []
|
message_ids: List[int] = []
|
||||||
|
|
||||||
|
|
|
@ -2124,7 +2124,7 @@ def privacy_clean_markdown(content: str) -> str:
|
||||||
|
|
||||||
def get_possible_mentions_info(realm_id: int, mention_texts: Set[str]) -> List[FullNameInfo]:
|
def get_possible_mentions_info(realm_id: int, mention_texts: Set[str]) -> List[FullNameInfo]:
|
||||||
if not mention_texts:
|
if not mention_texts:
|
||||||
return list()
|
return []
|
||||||
|
|
||||||
# Remove the trailing part of the `name|id` mention syntax,
|
# Remove the trailing part of the `name|id` mention syntax,
|
||||||
# thus storing only full names in full_names.
|
# thus storing only full names in full_names.
|
||||||
|
|
|
@ -1179,7 +1179,7 @@ def get_recent_private_conversations(user_profile: UserProfile) -> Dict[int, Dic
|
||||||
for recipient_id, max_message_id in rows:
|
for recipient_id, max_message_id in rows:
|
||||||
recipient_map[recipient_id] = dict(
|
recipient_map[recipient_id] = dict(
|
||||||
max_message_id=max_message_id,
|
max_message_id=max_message_id,
|
||||||
user_ids=list(),
|
user_ids=[],
|
||||||
)
|
)
|
||||||
|
|
||||||
# Now we need to map all the recipient_id objects to lists of user IDs
|
# Now we need to map all the recipient_id objects to lists of user IDs
|
||||||
|
|
Loading…
Reference in New Issue