From 6c55441d7f290d6168274b47dd2813a5a6d91333 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Fri, 26 Feb 2021 20:55:30 +0000 Subject: [PATCH] Format code with yapf This commit fixes the style issues introduced in 71a1e0f according to the output from yapf. Details: https://deepsource.io/gh/AdrianVazquezMejia/middle-node/transform/dd8f3b3b-b3c2-4bbe-88d8-dbc189cf671c/ --- src/centralnode.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/centralnode.py b/src/centralnode.py index fd18b8b..f140276 100644 --- a/src/centralnode.py +++ b/src/centralnode.py @@ -7,14 +7,12 @@ class ConfigError(Exception): - def __init__(self): self.message = "Can not config" # Esta clase contiene la informacion del nodo class centralnode: - def __init__(self, config_path): config_file = open(config_path, 'r') config_dic = json.load(config_file) @@ -84,7 +82,9 @@ def config_trama(self): return config_frame def init_lora(self): - expect = [1, 0, 129, 12, 165, 165, 108, 64, 18, 7, 0, 0, 1, 1, 0, 3, 0, 182] + expect = [ + 1, 0, 129, 12, 165, 165, 108, 64, 18, 7, 0, 0, 1, 1, 0, 3, 0, 182 + ] config_frame = self.config_trama() self.ser = serial.Serial(self.lora_port, timeout=5) self.ser.write(bytearray(config_frame)) @@ -104,7 +104,6 @@ def init_lora(self): class loranode: - def __init__(self, dic): self.id = dic['loraid'] self.slaves = dic['slaves']