Commit 55aab55b authored by Philipp Hörist's avatar Philipp Hörist
Browse files

Fix consider-using-in pylint errors

parent a77804f4
......@@ -230,7 +230,7 @@ def set_values(self, vcard_):
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 @@ def endElement(self, name):
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 @@ def has_text(self):
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 @@ def clear_tags(self):
_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 @@ def color_set(self, widget, response):
_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 @@ def accel_group_func(self, accel_group, acceleratable, keyval, modifier):
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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment