ruff: Fix SIM910 Use `d.get(…)` instead of `d.get(…, None)`.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit f165ba0fb3)
This commit is contained in:
Anders Kaseorg 2024-02-01 16:23:41 -08:00 committed by Tim Abbott
parent 1fa8862e48
commit 3f9e4bd54b
1 changed files with 1 additions and 1 deletions

View File

@ -343,7 +343,7 @@ class EventQueue:
def from_dict(cls, d: Dict[str, Any]) -> "EventQueue": def from_dict(cls, d: Dict[str, Any]) -> "EventQueue":
ret = cls(d["id"]) ret = cls(d["id"])
ret.next_event_id = d["next_event_id"] ret.next_event_id = d["next_event_id"]
ret.newest_pruned_id = d.get("newest_pruned_id", None) ret.newest_pruned_id = d.get("newest_pruned_id")
ret.queue = deque(d["queue"]) ret.queue = deque(d["queue"])
ret.virtual_events = d.get("virtual_events", {}) ret.virtual_events = d.get("virtual_events", {})
return ret return ret