fixing codeclimate complains
This commit is contained in:
parent
f888d080d6
commit
def0dc260d
1 changed files with 10 additions and 16 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Reference in a new issue