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