Philipp Hörist pushed to branch master at gajim / gajim
Commits: 4cd78631 by lovetox at 2021-11-07T12:11:07+01:00 Annotations: Fix type annotation
- - - - -
1 changed file:
- gajim/common/modules/annotations.py
Changes:
===================================== gajim/common/modules/annotations.py ===================================== @@ -17,11 +17,13 @@ from typing import Any from typing import Dict from typing import Tuple +from typing import Union from typing import Optional
from nbxmpp.errors import StanzaError from nbxmpp.errors import MalformedStanzaError from nbxmpp.structs import AnnotationNote +from nbxmpp.protocol import JID
from gajim.common.types import ConnectionT from gajim.common.modules.base import BaseModule @@ -38,7 +40,7 @@ class Annotations(BaseModule): def __init__(self, con: ConnectionT) -> None: BaseModule.__init__(self, con)
- self._annotations: Dict[str, AnnotationNote] = {} + self._annotations: Dict[Union[JID, str], AnnotationNote] = {}
def request_annotations(self) -> None: self._nbxmpp('Annotations').request_annotations(
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/4cd78631e8c8f3c75549c0e6de585a6d3...