Skip to content

Commit b4d34bd

Browse files
committed
fix: fix linter errors
1 parent 677f95c commit b4d34bd

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/tgdb/entities/relation/domain.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from abc import ABC, abstractmethod
21
from dataclasses import dataclass
32
from datetime import datetime
43
from uuid import UUID

src/tgdb/infrastructure/telethon/lazy_message_map.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from tgdb.entities.relation.tuple import TID
77
from tgdb.infrastructure.heap_tuple_encoding import HeapTupleEncoding
8-
from tgdb.infrastructure.lazy_map import LazyMap
8+
from tgdb.infrastructure.lazy_map import ExternalValue, LazyMap, NoExternalValue
99
from tgdb.infrastructure.telethon.client_pool import TelegramClientPool
1010

1111

@@ -15,16 +15,16 @@
1515
def lazy_message_map(
1616
chat_id: int, pool: TelegramClientPool, computed_map_max_len: int
1717
) -> LazyMessageMap:
18-
async def tuple_message(tid: TID) -> Message | None:
18+
async def tuple_message(tid: TID) -> ExternalValue[Message]:
1919
search = HeapTupleEncoding.id_of_encoded_tuple_with_tid(tid)
2020

2121
messages = cast(TotalList, await pool().get_messages(
2222
chat_id, search=search, limit=1
2323
))
2424

2525
if not messages:
26-
return None
26+
return NoExternalValue()
2727

28-
return cast(Message | None, messages[0])
28+
return cast(Message, messages[0])
2929

3030
return LazyMap(computed_map_max_len, tuple_message)

0 commit comments

Comments
 (0)