Fix consider-using-ternary pylint errors

This commit is contained in:
Philipp Hörist 2019-04-07 19:48:09 +02:00
parent dc3910ce4c
commit 20d3e981b9
3 changed files with 4 additions and 7 deletions

View File

@ -1399,9 +1399,6 @@ class Dialog(Gtk.Dialog):
def just_destroy(self, widget):
self.destroy()
def get_button(self, index):
buttons = self.get_action_area().get_children()
return index < len(buttons) and buttons[index] or None
class DataFormWindow(Dialog):
def __init__(self, form, on_response_ok):

View File

@ -4461,8 +4461,9 @@ class RosterWindow:
return
# Is the contact we drag a meta contact?
accounts = (self.regroup and app.contacts.get_accounts()) or \
account_source
accounts = account_source
if self.regroup:
accounts = app.contacts.get_accounts() or account_source
is_big_brother = app.contacts.is_big_brother(account_source,
jid_source, accounts)

View File

@ -1,7 +1,7 @@
#!/bin/sh
PYLINT=${PYLINT:-pylint}
"$PYLINT" --disable=C0103,C0302,C0330,C0411,C0412,C0413,E0203,E0401,E0611,E0710,E0712,E1101,E1102,E1128,E1133,E1136,R0201,R0901,R0904,R0913,R0916,R1702,R1706,R1716,W0201,W0212,W0221,W0223,W0311,W0401,W0603,W0613,W0614 "$@"
"$PYLINT" --disable=C0103,C0302,C0330,C0411,C0412,C0413,E0203,E0401,E0611,E0710,E0712,E1101,E1102,E1128,E1133,E1136,R0201,R0901,R0904,R0913,R0916,R1702,R1716,W0201,W0212,W0221,W0223,W0311,W0401,W0603,W0613,W0614 "$@"
# C0103 invalid-name
# C0302 too-many-lines
@ -25,7 +25,6 @@ PYLINT=${PYLINT:-pylint}
# R0913 too-many-arguments
# R0916 too-many-boolean-expressions
# R1702 too-many-nested-blocks
# R1706 consider-using-ternary
# R1716 chained-comparison
# W0201 attribute-defined-outside-init
# W0212 protected-access