Fix consider-using-in pylint errors
This commit is contained in:
parent
20c5af5deb
commit
7a96e6a4e4
|
@ -230,7 +230,7 @@ class ProfileWindow(Gtk.ApplicationWindow):
|
|||
button.show()
|
||||
text_button.hide()
|
||||
continue
|
||||
if i == 'ADR' or i == 'TEL' or i == 'EMAIL':
|
||||
if i in ('ADR', 'TEL', 'EMAIL'):
|
||||
for entry in vcard_[i]:
|
||||
add_on = '_HOME'
|
||||
if 'WORK' in entry:
|
||||
|
|
|
@ -804,7 +804,7 @@ class HtmlHandler(xml.sax.handler.ContentHandler):
|
|||
newLine = True
|
||||
elif name == 'img':
|
||||
pass
|
||||
elif name == 'body' or name == 'html':
|
||||
elif name in ('body', 'html'):
|
||||
pass
|
||||
elif name == 'a':
|
||||
pass
|
||||
|
|
|
@ -98,7 +98,7 @@ class MessageTextView(Gtk.TextView):
|
|||
buf = self.get_buffer()
|
||||
start, end = buf.get_bounds()
|
||||
text = buf.get_text(start, end, True)
|
||||
return text != self.PLACEHOLDER and text != ''
|
||||
return text not in (self.PLACEHOLDER, '')
|
||||
|
||||
def get_text(self):
|
||||
# gets the text if its not PLACEHOLDER
|
||||
|
@ -211,7 +211,7 @@ class MessageTextView(Gtk.TextView):
|
|||
_buffer.remove_all_tags(start, finish)
|
||||
|
||||
def color_set(self, widget, response):
|
||||
if response == -6 or response == -4:
|
||||
if response in (-6, -4):
|
||||
widget.destroy()
|
||||
return
|
||||
|
||||
|
@ -238,7 +238,7 @@ class MessageTextView(Gtk.TextView):
|
|||
_buffer.apply_tag_by_name(tag_name, start, finish)
|
||||
|
||||
def font_set(self, widget, response, start, finish):
|
||||
if response == -6 or response == -4:
|
||||
if response in (-6, -4):
|
||||
widget.destroy()
|
||||
return
|
||||
|
||||
|
|
|
@ -374,7 +374,7 @@ class MessageWindow:
|
|||
self.window.lookup_action(
|
||||
'information-%s' % control.control_id).activate()
|
||||
return True
|
||||
elif keyval == Gdk.KEY_l or keyval == Gdk.KEY_L: # CTRL + l|L
|
||||
elif keyval in (Gdk.KEY_l, Gdk.KEY_L): # CTRL + l|L
|
||||
control.conv_textview.clear()
|
||||
return True
|
||||
elif keyval == Gdk.KEY_u: # CTRL + u: emacs style clear line
|
||||
|
|
Loading…
Reference in New Issue