Philipp Hörist pushed to branch master at gajim / gajim


Commits:
0ee3a733 by lovetox at 2021-12-09T01:22:58+01:00
Fix pylint errors

- - - - -


5 changed files:

- gajim/common/modules/adhoc_commands.py
- gajim/common/socks5.py
- gajim/gajim_remote.py
- gajim/gtk/controls/base.py
- pylintrc


Changes:

=====================================
gajim/common/modules/adhoc_commands.py
=====================================
@@ -303,7 +303,7 @@ def _execute_command_received(self, _con, stanza, 
_properties):
         if sessionid is None:
             # we start a new command session
             # only if we are visible for the jid and command exist
-            if node not in self._commands.keys():
+            if node not in self._commands:
                 self._con.connection.send(
                     nbxmpp.Error(
                         stanza, Namespace.STANZAS + ' item-not-found'))


=====================================
gajim/common/socks5.py
=====================================
@@ -85,7 +85,7 @@ def start_listener(self, port, sha_str, sha_handler, 
file_props,
         log.debug('Start listening for socks5 connection')
         sid = file_props.sid
         self.sha_handlers[sha_str] = (sha_handler, sid)
-        if self.listener is None or self.listener.connections == []:
+        if self.listener is None or not self.listener.connections:
             self.listener = Socks5Listener(self.idlequeue, port, file_props,
                 fingerprint=fingerprint)
             self.listener.queue = self


=====================================
gajim/gajim_remote.py
=====================================
@@ -211,7 +211,7 @@ def __init__(self):
                 }
 
         self.sbus = None
-        if self.argv_len < 2 or sys.argv[1] not in self.commands.keys():
+        if self.argv_len < 2 or sys.argv[1] not in self.commands:
             # no args or bad args
             send_error(self.compose_help())
         self.command = sys.argv[1]


=====================================
gajim/gtk/controls/base.py
=====================================
@@ -275,15 +275,6 @@ def __init__(self, widget_name: str, account: str, jid: 
JID) -> None:
     def _connect_contact_signals(self):
         raise NotImplementedError
 
-    def _process_jingle_av_event(self, *args):
-        raise NotImplementedError
-
-    def get_our_nick(self):
-        raise NotImplementedError
-
-    def room_name(self):
-        raise NotImplementedError
-
     def _get_action(self, name: str) -> Gio.Action:
         return app.window.lookup_action(f'{name}{self.control_id}')
 


=====================================
pylintrc
=====================================
@@ -146,7 +146,7 @@ 
ignored-classes=optparse.Values,thread._local,_thread._local,gi.repository.GLib.
 # (useful for modules/projects where namespaces are manipulated during runtime
 # and thus existing member attributes cannot be deduced by static analysis. It
 # supports qualified module names, as well as Unix pattern matching.
-ignored-modules=gi.repository,gajim.gui
+ignored-modules=gi.repository,gajim.gui,cairo
 
 # Show a hint with possible names when a member name was not found. The aspect
 # of finding the hint is based on edit distance.



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/0ee3a7335f73a632e68f13a8c0d96bba874e44be

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/0ee3a7335f73a632e68f13a8c0d96bba874e44be
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to