Skip to content

Commit d520e50

Browse files
committed
refactor: Replace 'private_' with 'direct_'.
1 parent 7db8adc commit d520e50

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,8 +1068,8 @@ def empty_index(
10681068
all_msg_ids=set(),
10691069
starred_msg_ids=set(),
10701070
mentioned_msg_ids=set(),
1071-
private_msg_ids=set(),
1072-
private_msg_ids_by_user_ids=defaultdict(set, {}),
1071+
direct_msg_ids=set(),
1072+
direct_msg_ids_by_user_ids=defaultdict(set, {}),
10731073
stream_msg_ids_by_stream_id=defaultdict(set, {}),
10741074
topic_msg_ids=defaultdict(dict, {}),
10751075
edited_messages=set(),

tests/helper/test_helper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def test_index_starred(
178178
model.narrow = [["is", "starred"]]
179179
model.is_search_narrow.return_value = False
180180
expected_index: Dict[str, Any] = dict(
181-
empty_index, private_msg_ids={537287, 537288}, starred_msg_ids=msgs_with_stars
181+
empty_index, direct_msg_ids={537287, 537288}, starred_msg_ids=msgs_with_stars
182182
)
183183
for msg_id, msg in expected_index["messages"].items():
184184
if msg_id in msgs_with_stars and "starred" not in msg["flags"]:
@@ -211,7 +211,7 @@ def test_index_mentioned_messages(
211211
model.is_search_narrow.return_value = False
212212
expected_index: Dict[str, Any] = dict(
213213
empty_index,
214-
private_msg_ids={537287, 537288},
214+
direct_msg_ids={537287, 537288},
215215
mentioned_msg_ids=(mentioned_messages | wildcard_mentioned_messages),
216216
)
217217

zulipterminal/helper.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ class Index(TypedDict):
104104
all_msg_ids: Set[int]
105105
starred_msg_ids: Set[int]
106106
mentioned_msg_ids: Set[int]
107-
private_msg_ids: Set[int]
108-
private_msg_ids_by_user_ids: Dict[FrozenSet[int], Set[int]]
107+
direct_msg_ids: Set[int]
108+
direct_msg_ids_by_user_ids: Dict[FrozenSet[int], Set[int]]
109109
stream_msg_ids_by_stream_id: Dict[int, Set[int]]
110110
topic_msg_ids: Dict[int, Dict[str, Set[int]]]
111111
# Extra cached information
@@ -121,8 +121,8 @@ class Index(TypedDict):
121121
all_msg_ids=set(),
122122
starred_msg_ids=set(),
123123
mentioned_msg_ids=set(),
124-
private_msg_ids=set(),
125-
private_msg_ids_by_user_ids=defaultdict(set),
124+
direct_msg_ids=set(),
125+
direct_msg_ids_by_user_ids=defaultdict(set),
126126
stream_msg_ids_by_stream_id=defaultdict(set),
127127
topic_msg_ids=defaultdict(dict),
128128
edited_messages=set(),

0 commit comments

Comments
 (0)