fixing codeclimate complains

This commit is contained in:
Andrei Lando 2023-09-12 18:02:19 +04:00
parent f888d080d6
commit def0dc260d

View file

@ -65,21 +65,15 @@ class Module(core.module.Module):
if self.parameter("scrolling.makewide") is None:
self.set("scrolling.makewide", False)
if self.__left_click_command is not None:
for command, button in (
(self.__left_click_command, core.input.LEFT_MOUSE),
(self.__right_click_command, core.input.RIGHT_MOUSE),
):
if command is not None:
core.input.register(
self.widget,
button=core.input.LEFT_MOUSE,
cmd=functools.partial(
self.click_command, command=self.__left_click_command
),
)
if self.__right_click_command is not None:
core.input.register(
self.widget,
button=core.input.RIGHT_MOUSE,
cmd=functools.partial(
self.click_command, command=self.__right_click_command
),
button=button,
cmd=functools.partial(self.click_command, command=command),
)
def set_output(self, value):