Skip to content

Commit f55d757

Browse files
committed
refactor: Install & test - CPython 3.7 (ubuntu), codeco (3).
1 parent 94f4c5b commit f55d757

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

tests/conftest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1473,7 +1473,7 @@ def classified_unread_counts() -> Dict[str, Any]:
14731473
(1000, "Some general unread topic"): 3,
14741474
(99, "Some private unread topic"): 1,
14751475
},
1476-
"unread_dms": {
1476+
"unread_pms": {
14771477
1: 2,
14781478
2: 1,
14791479
},

tests/ui/test_ui_tools.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,7 @@ def mock_external_classes(self, mocker):
993993
self.thread = mocker.patch(VIEWS + ".threading")
994994
self.super = mocker.patch(VIEWS + ".urwid.Frame.__init__")
995995
self.view.model.unread_counts = { # Minimal, though an UnreadCounts
996-
"unread_dms": {
996+
"unread_pms": {
997997
1: 1,
998998
2: 1,
999999
}

zulipterminal/helper.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ class UnreadCounts(TypedDict):
138138
all_dms: int
139139
all_mentions: int
140140
unread_topics: Dict[Tuple[int, str], int] # stream_id, topic
141-
unread_dms: Dict[int, int] # sender_id
141+
unread_pms: Dict[int, int] # sender_id
142142
unread_huddles: Dict[FrozenSet[int], int] # Group dms
143143
streams: Dict[int, int] # stream_id
144144

@@ -209,7 +209,7 @@ def update_unreads(unreads: Dict[KeyT, int], key: KeyT) -> None:
209209
# self-dm has only one display_recipient
210210
# 1-1 dms have 2 display_recipient
211211
elif len(message["display_recipient"]) <= 2:
212-
update_unreads(unread_counts["unread_dms"], message["sender_id"])
212+
update_unreads(unread_counts["unread_pms"], message["sender_id"])
213213
else: # If it's a group dm
214214
update_unreads(
215215
unread_counts["unread_huddles"],
@@ -490,7 +490,7 @@ def classify_unread_counts(model: Any) -> UnreadCounts:
490490
all_dms=0,
491491
all_mentions=0,
492492
unread_topics=dict(),
493-
unread_dms=dict(),
493+
unread_pms=dict(),
494494
unread_huddles=dict(),
495495
streams=defaultdict(int),
496496
)
@@ -500,7 +500,7 @@ def classify_unread_counts(model: Any) -> UnreadCounts:
500500

501501
for dm in unread_msg_counts["pms"]:
502502
count = len(dm["unread_message_ids"])
503-
unread_counts["unread_dms"][dm["sender_id"]] = count
503+
unread_counts["unread_pms"][dm["sender_id"]] = count
504504
unread_counts["all_msg"] += count
505505
unread_counts["all_dms"] += count
506506

zulipterminal/model.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@ def next_unread_topic_from_message_id(
10241024
return None
10251025

10261026
def get_next_unread_pm(self) -> Optional[int]:
1027-
pms = list(self.unread_counts["unread_dms"].keys())
1027+
pms = list(self.unread_counts["unread_pms"].keys())
10281028
next_pm = False
10291029
for pm in pms:
10301030
if next_pm is True:

0 commit comments

Comments
 (0)