Fix pylint errors

- pointless-statement
- pointless-string-statement
- unnecessary-lambda
This commit is contained in:
Philipp Hörist 2018-09-18 16:44:23 +02:00 committed by Philipp Hörist
parent 62020bf6aa
commit 64487929a6
4 changed files with 8 additions and 14 deletions

View File

@ -188,14 +188,12 @@ def detect_dependencies():
# python-gnupg
try:
import gnupg
'''
We need https://pypi.python.org/pypi/python-gnupg
but https://pypi.python.org/pypi/gnupg shares the same package name.
It cannot be used as a drop-in replacement.
We test with a version check if python-gnupg is installed as it is
on a much lower version number than gnupg
Also we need at least python-gnupg 0.3.8
'''
# We need https://pypi.python.org/pypi/python-gnupg
# but https://pypi.python.org/pypi/gnupg shares the same package name.
# It cannot be used as a drop-in replacement.
# We test with a version check if python-gnupg is installed as it is
# on a much lower version number than gnupg
# Also we need at least python-gnupg 0.3.8
v_gnupg = gnupg.__version__
if V(v_gnupg) < V('0.3.8') or V(v_gnupg) > V('1.0.0'):
log('gajim').info('Gajim needs python-gnupg >= 0.3.8')

View File

@ -466,7 +466,7 @@ class FileTransfersWindow:
iter_ = self.get_iter_by_sid(file_props.type_, file_props.sid)
if iter_ is None:
return
self.model[iter_][Column.SID]
if status == 'stop':
file_props.stopped = True
elif status == 'ok':

View File

@ -185,7 +185,7 @@ class ProfileWindow(Gtk.ApplicationWindow):
pritext,
_('Format of the date must be YYYY-MM-DD'),
transient_for=self)
GLib.idle_add(lambda: widget.grab_focus())
GLib.idle_add(widget.grab_focus)
return True
def set_value(self, entry_name, value):

View File

@ -594,10 +594,6 @@ def get_transport_menu(contact, account):
menu.show_all()
return menu
'''
Build dynamic Application Menus
'''
def get_singlechat_menu(control_id):
singlechat_menu = [