From 9b45b2ac0318041ac69007be76354183d0f6461d Mon Sep 17 00:00:00 2001 From: Yaroslav Chvanov Date: Wed, 1 Mar 2023 18:16:47 +0300 Subject: [PATCH] tools: fix "line too long" warnings where possible --- tools/ratbagctl.body.py.in | 14 ++++++++++---- tools/ratbagctl.test.py.in | 10 ++++++++-- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/tools/ratbagctl.body.py.in b/tools/ratbagctl.body.py.in index 8a7cdf94..0c942256 100755 --- a/tools/ratbagctl.body.py.in +++ b/tools/ratbagctl.body.py.in @@ -175,7 +175,8 @@ def print_led(_device, _profile, led, level): elif led.mode == RatbagdLed.Mode.BREATHING: print( " " * level - + "LED: {}, depth: {}, mode: {}, color: {:02x}{:02x}{:02x}, duration: {}, brightness: {}".format( + + "LED: {}, depth: {}, mode: {}, color: {:02x}{:02x}{:02x}, duration: {}," + " brightness: {}".format( led.index, depths[led.colordepth], leds[led.mode], @@ -1105,7 +1106,9 @@ active profile if none is given.""", { of_type: command, name: "special", - help_str: "Set the button action to special action S", + help_str: ( + "Set the button action to special action S" + ), pos_args: [ { of_type: argument, @@ -1231,7 +1234,9 @@ active profile if none is given.""", of_type: argument, name: "color", metavar: "RRGGBB", - help_str: "The color in hex format to set as current", + help_str: ( + "The color in hex format to set as current" + ), arg_type: color, }, ], @@ -1656,7 +1661,8 @@ Common options: ) if self.want_keepalive: print( - " --keepalive do not terminate ratbagd after the processing" + " --keepalive do not terminate ratbagd after the" + " processing" ) print( """ diff --git a/tools/ratbagctl.test.py.in b/tools/ratbagctl.test.py.in index 10dc83c9..dccc0735 100755 --- a/tools/ratbagctl.test.py.in +++ b/tools/ratbagctl.test.py.in @@ -454,7 +454,12 @@ class TestRatbagCtlDPI(TestRatbagCtl): self.launch_fail_test("test_device " + command + " X") def test_dpi_get_all(self): - dpi_list = "50 100 150 200 250 300 350 400 450 500 550 600 650 700 750 800 850 900 950 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000 2100 2200 2300 2400 2500 2600 2800 3000 3200 3400 3600 3800 4000 4200 4400 4600 4800 5000" + dpi_list = ( + "50 100 150 200 250 300 350 400 450 500 550 600 650 700 750 800 850 900 950" + " 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000 2100 2200 2300" + " 2400 2500 2600 2800 3000 3200 3400 3600 3800 4000 4200 4400 4600 4800" + " 5000" + ) command = "dpi get-all" r = self.launch_good_test("test_device " + command) self.assertEqual(r, dpi_list) @@ -845,7 +850,8 @@ class TestRatbagCtlLED(TestRatbagCtl): r, "LED: 0, depth: rgb, mode: cycle, duration: 100, brightness: 200" ) r = self.launch_good_test( - "test_device led 0 set duration 100 brightness 200 mode cycle brightness 100" + "test_device led 0 set duration 100 brightness 200 mode cycle" + " brightness 100" ) r = self.launch_good_test("test_device led 0 get") self.assertEqual(