bindings: python: examples: gpioset: drop redundant []
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 12 Jun 2023 15:55:29 +0000 (17:55 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 12 Jun 2023 15:55:29 +0000 (17:55 +0200)
dict() accepts an iterable, so the [] brackets are redundant.

Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
bindings/python/examples/gpioset.py

index 0323e3577998bbd6b4ff592f93e62f7ec32b19c1..e6a516c7a9290ff4a72d0f5fd49ea7ff3a7ff514 100755 (executable)
@@ -25,7 +25,7 @@ if __name__ == "__main__":
         return gpiod.LineSettings(direction=Direction.OUTPUT, output_value=val)
 
     lvs = [parse_value(arg) for arg in sys.argv[2:]]
-    config = dict([(l, make_settings(v)) for (l, v) in lvs])
+    config = dict((l, make_settings(v)) for (l, v) in lvs)
 
     request = gpiod.request_lines(
         path,