mirror of
https://github.com/libratbag/piper.git
synced 2026-05-19 12:26:00 -04:00
Replaced multiple comparison with in function
This commit is contained in:
committed by
Yaroslav Chvanov
parent
da0056500d
commit
e4b3f59ebb
@@ -165,7 +165,7 @@ class ButtonDialog(Gtk.Dialog):
|
||||
self.listbox.select_row(row)
|
||||
i += 1
|
||||
for key, name in RatbagdButton.SPECIAL_DESCRIPTION.items():
|
||||
if name == "Unknown" or name == "Invalid":
|
||||
if name in ["Unknown", "Invalid"]:
|
||||
continue
|
||||
# Translators: section header for assigning special functions to buttons.
|
||||
row = ButtonRow(
|
||||
|
||||
@@ -97,10 +97,7 @@ class Window(Gtk.ApplicationWindow):
|
||||
response = dialog.run()
|
||||
dialog.destroy()
|
||||
|
||||
if (
|
||||
response == Gtk.ResponseType.NO
|
||||
or response == Gtk.ResponseType.DELETE_EVENT
|
||||
):
|
||||
if response in [Gtk.ResponseType.NO, Gtk.ResponseType.DELETE_EVENT]:
|
||||
return Gdk.EVENT_STOP
|
||||
return Gdk.EVENT_PROPAGATE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user