From 4b2d9a0e6fbb58e66479ad37cc583ff849d64471 Mon Sep 17 00:00:00 2001 From: Rogier van Staveren Date: Sun, 16 Jun 2024 16:37:44 +0200 Subject: [PATCH] black formatting --- rfcontrol/controller.py | 1 + rfcontrol/helpers.py | 1 + rfcontrol/protocols/_skeleton.py | 5 +++-- rfcontrol/protocols/pir6.py | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/rfcontrol/controller.py b/rfcontrol/controller.py index 1d19e17..044f94c 100644 --- a/rfcontrol/controller.py +++ b/rfcontrol/controller.py @@ -1,6 +1,7 @@ """ Python port of the original CoffeeScript/nodejs code """ + import glob import logging from os.path import basename, dirname, isfile, join diff --git a/rfcontrol/helpers.py b/rfcontrol/helpers.py index 764495d..ccfa241 100644 --- a/rfcontrol/helpers.py +++ b/rfcontrol/helpers.py @@ -1,6 +1,7 @@ """ Python port of the original CoffeeScript/nodejs code """ + import logging logger = logging.getLogger(__name__) diff --git a/rfcontrol/protocols/_skeleton.py b/rfcontrol/protocols/_skeleton.py index f06d7c5..84ee2c8 100644 --- a/rfcontrol/protocols/_skeleton.py +++ b/rfcontrol/protocols/_skeleton.py @@ -1,6 +1,7 @@ """ Use this skeleton protocol to implement new protocols """ + import logging from rfcontrol.helpers import binary2pulses, pulses2binary @@ -27,11 +28,11 @@ def decode(pulses): # We first map the sequences to binary. binary = pulses2binary(pulses, pulses2binary_mapping) - + if binary is None: return None - # Binary is now something like: + # Binary is now something like: # # Now we extract the data from that string. diff --git a/rfcontrol/protocols/pir6.py b/rfcontrol/protocols/pir6.py index 0327c15..ad6e2b9 100644 --- a/rfcontrol/protocols/pir6.py +++ b/rfcontrol/protocols/pir6.py @@ -24,7 +24,7 @@ def decode(pulses): # Pulses is something like: - # + # # We first map the sequences to binary. binary = pulses2binary(pulses, pulses2binary_mapping)