Formatting + type hints

This commit is contained in:
Goffi 2026-04-27 15:45:40 +02:00
commit 610eac0718
2 changed files with 15 additions and 13 deletions

View file

@ -665,7 +665,7 @@ class Memory:
to_jid: jid.JID | None,
limit: int = C.HISTORY_LIMIT_NONE,
between: bool = True,
filters: dict[str, str] | None = None,
filters: dict[str, str | bool] | None = None,
profile: str = C.PROF_KEY_NONE,
) -> defer.Deferred[list]:
"""Retrieve messages in history

View file

@ -547,13 +547,15 @@ class Storage:
@aio
async def history_get(
self,
from_jid: Optional[jid.JID],
to_jid: Optional[jid.JID],
limit: Optional[int] = None,
from_jid: jid.JID | None,
to_jid: jid.JID | None,
limit: int | None = None,
between: bool = True,
filters: Optional[Dict[str, str]] = None,
profile: Optional[str] = None,
) -> List[Tuple[str, int, str, str, Dict[str, str], Dict[str, str], str, str, str]]:
filters: dict[str, str | bool] | None = None,
profile: str | None = None,
) -> list[
tuple[str, float, str, str, dict[str, str], dict[str, str], str, dict[str, Any]]
]:
"""Retrieve messages in history
@param from_jid: source JID (full, or bare for catchall)