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,22 +65,16 @@ class Module(core.module.Module):
if self.parameter("scrolling.makewide") is None: if self.parameter("scrolling.makewide") is None:
self.set("scrolling.makewide", False) self.set("scrolling.makewide", False)
if self.__left_click_command is not None: for command, button in (
core.input.register( (self.__left_click_command, core.input.LEFT_MOUSE),
self.widget, (self.__right_click_command, core.input.RIGHT_MOUSE),
button=core.input.LEFT_MOUSE, ):
cmd=functools.partial( if command is not None:
self.click_command, command=self.__left_click_command core.input.register(
), self.widget,
) button=button,
if self.__right_click_command is not None: cmd=functools.partial(self.click_command, command=command),
core.input.register( )
self.widget,
button=core.input.RIGHT_MOUSE,
cmd=functools.partial(
self.click_command, command=self.__right_click_command
),
)
def set_output(self, value): def set_output(self, value):
self.__output = value self.__output = value