[core] more black'ing
This commit is contained in:
parent
ef4d87af8e
commit
02a80840a1
3 changed files with 10 additions and 12 deletions
|
@ -203,11 +203,11 @@ class Module(core.input.Object):
|
||||||
|
|
||||||
def register_callbacks(self):
|
def register_callbacks(self):
|
||||||
actions = [
|
actions = [
|
||||||
{ "name": "left-click", "id": core.input.LEFT_MOUSE },
|
{"name": "left-click", "id": core.input.LEFT_MOUSE},
|
||||||
{ "name": "right-click", "id": core.input.RIGHT_MOUSE },
|
{"name": "right-click", "id": core.input.RIGHT_MOUSE},
|
||||||
{ "name": "middle-click", "id": core.input.MIDDLE_MOUSE },
|
{"name": "middle-click", "id": core.input.MIDDLE_MOUSE},
|
||||||
{ "name": "wheel-up", "id": core.input.WHEEL_UP },
|
{"name": "wheel-up", "id": core.input.WHEEL_UP},
|
||||||
{ "name": "wheel-down", "id": core.input.WHEEL_DOWN },
|
{"name": "wheel-down", "id": core.input.WHEEL_DOWN},
|
||||||
]
|
]
|
||||||
for action in actions:
|
for action in actions:
|
||||||
if self.parameter(action["name"]):
|
if self.parameter(action["name"]):
|
||||||
|
|
|
@ -17,6 +17,7 @@ class TestModule(core.module.Module):
|
||||||
def get(self, widget):
|
def get(self, widget):
|
||||||
return self.text
|
return self.text
|
||||||
|
|
||||||
|
|
||||||
class config(unittest.TestCase):
|
class config(unittest.TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.module = TestModule()
|
self.module = TestModule()
|
||||||
|
|
|
@ -148,14 +148,11 @@ class module(unittest.TestCase):
|
||||||
|
|
||||||
with unittest.mock.patch("core.input.util.cli") as cli:
|
with unittest.mock.patch("core.input.util.cli") as cli:
|
||||||
cli.execute.return_value = ""
|
cli.execute.return_value = ""
|
||||||
core.input.trigger({
|
core.input.trigger(
|
||||||
"button": core.input.LEFT_MOUSE,
|
{"button": core.input.LEFT_MOUSE, "instance": module.id,}
|
||||||
"instance": module.id,
|
|
||||||
})
|
|
||||||
|
|
||||||
cli.execute.assert_called_once_with(
|
|
||||||
cmd, wait=False, shell=True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
cli.execute.assert_called_once_with(cmd, wait=False, shell=True)
|
||||||
|
|
||||||
|
|
||||||
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|
||||||
|
|
Loading…
Reference in a new issue