Skip to content

Commit e050a8f

Browse files
committed
Fix mypy
1 parent 26132f7 commit e050a8f

File tree

1 file changed

+1
-1
lines changed
  • python/jupyterlab-chat/jupyterlab_chat

1 file changed

+1
-1
lines changed

python/jupyterlab-chat/jupyterlab_chat/ychat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ async def _set_timestamp(self, msg_idx: int, timestamp: float):
370370
# should be the last one.
371371
# The next() function below return the index of the first message with a timestamp inferior of the
372372
# current one, starting from the end of the list.
373-
new_idx = len(self._ymessages) - next((i for i, v in enumerate(self._get_messages()[::-1]) if v.get("time") < timestamp), len(self._ymessages))
373+
new_idx = len(self._ymessages) - next((i for i, v in enumerate(self._get_messages()[::-1]) if v.get("time", 0) < timestamp), len(self._ymessages))
374374
if msg_idx != new_idx:
375375
message = self._ymessages.pop(msg_idx)
376376
self._ymessages.insert(new_idx, message)

0 commit comments

Comments
 (0)