my.fbmessenger: add Sender protocol for consistency

This commit is contained in:
Dima Gerasimov 2023-03-16 23:16:18 +00:00 committed by karlicoss
parent 58d2e25a42
commit 347cd1ef77

View file

@ -10,8 +10,16 @@ class Thread(Protocol):
@property
def id(self) -> str: ...
# todo hmm it doesn't like it because one from .export is just str, not Optional...
# name: Optional[str]
@property
def name(self) -> Optional[str]: ...
class Sender(Protocol):
@property
def id(self) -> str: ...
@property
def name(self) -> Optional[str]: ...
class Message(Protocol):
@ -27,6 +35,9 @@ class Message(Protocol):
@property
def thread(self) -> Thread: ...
@property
def sender(self) -> Sender: ...
from itertools import chain
from more_itertools import unique_everseen