From c63481e05c0d91f3641b1b34512abee12b38787d Mon Sep 17 00:00:00 2001 From: TheYOSH Date: Mon, 22 Apr 2024 19:57:27 +0000 Subject: [PATCH] Python code is blacked --- hardware/sensor/__init__.py | 7 ++++++- hardware/webcam/rpi_webcam.py | 2 +- terrariumUtils.py | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/hardware/sensor/__init__.py b/hardware/sensor/__init__.py index b8a0c01cb..f837a0bae 100644 --- a/hardware/sensor/__init__.py +++ b/hardware/sensor/__init__.py @@ -81,7 +81,12 @@ def available_hardware(__cls__): for i in dir(imported_module): attribute = getattr(imported_module, i) - if inspect.isclass(attribute) and attribute != __cls__ and issubclass(attribute, __cls__) and attribute.HARDWARE is not None: + if ( + inspect.isclass(attribute) + and attribute != __cls__ + and issubclass(attribute, __cls__) + and attribute.HARDWARE is not None + ): if not bluetooth_available and issubclass(attribute, terrariumBluetoothSensor): logger.info(f"Skip sensor hardware '{attribute.NAME}' because no bluetooth available.") continue diff --git a/hardware/webcam/rpi_webcam.py b/hardware/webcam/rpi_webcam.py index dec4e2d10..2ee7508ca 100644 --- a/hardware/webcam/rpi_webcam.py +++ b/hardware/webcam/rpi_webcam.py @@ -21,7 +21,7 @@ def _load_hardware(self): raspistill = Path("/usr/bin/raspistill") if not raspistill.exists(): # New RPI Camera app - raspistill = Path('/usr/bin/rpicam-still') + raspistill = Path("/usr/bin/rpicam-still") if not raspistill.exists(): return None diff --git a/terrariumUtils.py b/terrariumUtils.py index af8e6b99e..7a5bb5b09 100644 --- a/terrariumUtils.py +++ b/terrariumUtils.py @@ -513,4 +513,4 @@ def is_docker(): def bluetooth_available(): cmd = "/usr/bin/hcitool dev" data = terrariumUtils.get_script_data(cmd).decode().strip().split("\n") - return len(data) > 1 \ No newline at end of file + return len(data) > 1