Philipp Hörist pushed to branch master at gajim / gajim
Commits:
c5dec94f by lovetox at 2021-11-07T19:25:23+01:00
ChatControl: Remove unnecessary keys() call
- - - - -
1 changed file:
- gajim/chat_control.py
Changes:
=====================================
gajim/chat_control.py
=====================================
@@ -1233,7 +1233,7 @@ def shutdown(self):
roster = app.interface.roster
has_pending = roster.contact_has_pending_roster_events(self.contact,
self.account)
- if key in roster.contacts_to_be_removed.keys() and not has_pending:
+ if key in roster.contacts_to_be_removed and not has_pending:
backend = roster.contacts_to_be_removed[key]['backend']
del roster.contacts_to_be_removed[key]
roster.remove_contact(self.contact.jid,
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/c5dec94fe05439a45c41c972f0267628…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/c5dec94fe05439a45c41c972f0267628…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
944ad9cc by lovetox at 2021-11-07T16:18:04+01:00
Configpaths: Fix get_paths()
_paths is not a dict we can’t use values()
- - - - -
5f15291a by lovetox at 2021-11-07T16:19:40+01:00
Fix dict iteration
- - - - -
2 changed files:
- gajim/common/configpaths.py
- gajim/common/helpers.py
Changes:
=====================================
gajim/common/configpaths.py
=====================================
@@ -53,11 +53,12 @@ def get_plugin_dirs() -> List[Path]:
def get_paths(type_: PathType) -> Generator[Path, None, None]:
- for value in _paths.values():
+ # pylint: disable=unnecessary-dict-index-lookup
+ for key, value in _paths.items():
path_type = value[2]
if type_ != path_type:
continue
- yield value
+ yield _paths[key]
def override_path(*args, **kwargs):
=====================================
gajim/common/helpers.py
=====================================
@@ -569,7 +569,7 @@ def statuses_unified():
Test if all statuses are the same
"""
reference = None
- for con, account in app.connections.items():
+ for account, con in app.connections.items():
if not app.settings.get_account_setting(account,
'sync_with_global_status'):
continue
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/064f77e9451f045773452b3788da778…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/064f77e9451f045773452b3788da778…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
261df4ba by lovetox at 2021-11-07T12:26:52+01:00
Jingle: Fix undefined variable
- - - - -
1 changed file:
- gajim/common/jingle_session.py
Changes:
=====================================
gajim/common/jingle_session.py
=====================================
@@ -445,7 +445,7 @@ def __on_session_info(self, stanza, jingle, error, action):
raise nbxmpp.NodeProcessed
if self.state != JingleStates.ACTIVE:
raise OutOfOrder
- for child in payload:
+ for child in jingle.getChildren():
if child.getName() == 'checksum':
hash_ = child.getTag('file').getTag(name='hash',
namespace=Namespace.HASHES_2)
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/261df4ba77057204b6acd84fffd42500…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/261df4ba77057204b6acd84fffd42500…
You're receiving this email because of your account on dev.gajim.org.
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/4cd78631e8c8f3c75549c0e6de585a6d…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/4cd78631e8c8f3c75549c0e6de585a6d…
You're receiving this email because of your account on dev.gajim.org.