From 02a80840a13d3a355bb1b828e3f01bf3f909db15 Mon Sep 17 00:00:00 2001 From: tobi-wan-kenobi Date: Sat, 16 May 2020 12:00:55 +0200 Subject: [PATCH] [core] more black'ing --- bumblebee_status/core/module.py | 10 +++++----- tests/core/test_decorators.py | 1 + tests/core/test_module.py | 11 ++++------- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/bumblebee_status/core/module.py b/bumblebee_status/core/module.py index e01d652..81f2604 100644 --- a/bumblebee_status/core/module.py +++ b/bumblebee_status/core/module.py @@ -203,11 +203,11 @@ class Module(core.input.Object): def register_callbacks(self): actions = [ - { "name": "left-click", "id": core.input.LEFT_MOUSE }, - { "name": "right-click", "id": core.input.RIGHT_MOUSE }, - { "name": "middle-click", "id": core.input.MIDDLE_MOUSE }, - { "name": "wheel-up", "id": core.input.WHEEL_UP }, - { "name": "wheel-down", "id": core.input.WHEEL_DOWN }, + {"name": "left-click", "id": core.input.LEFT_MOUSE}, + {"name": "right-click", "id": core.input.RIGHT_MOUSE}, + {"name": "middle-click", "id": core.input.MIDDLE_MOUSE}, + {"name": "wheel-up", "id": core.input.WHEEL_UP}, + {"name": "wheel-down", "id": core.input.WHEEL_DOWN}, ] for action in actions: if self.parameter(action["name"]): diff --git a/tests/core/test_decorators.py b/tests/core/test_decorators.py index e9c755a..ab924da 100644 --- a/tests/core/test_decorators.py +++ b/tests/core/test_decorators.py @@ -17,6 +17,7 @@ class TestModule(core.module.Module): def get(self, widget): return self.text + class config(unittest.TestCase): def setUp(self): self.module = TestModule() diff --git a/tests/core/test_module.py b/tests/core/test_module.py index aad7ca5..7628aac 100644 --- a/tests/core/test_module.py +++ b/tests/core/test_module.py @@ -148,14 +148,11 @@ class module(unittest.TestCase): with unittest.mock.patch("core.input.util.cli") as cli: cli.execute.return_value = "" - core.input.trigger({ - "button": core.input.LEFT_MOUSE, - "instance": module.id, - }) - - cli.execute.assert_called_once_with( - cmd, wait=False, shell=True + core.input.trigger( + {"button": core.input.LEFT_MOUSE, "instance": module.id,} ) + cli.execute.assert_called_once_with(cmd, wait=False, shell=True) + # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4