Skip to content

Commit

Permalink
Python code is blacked
Browse files Browse the repository at this point in the history
  • Loading branch information
theyosh authored and github-actions[bot] committed Apr 22, 2024
1 parent 4d9a4ca commit c63481e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion hardware/sensor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion hardware/webcam/rpi_webcam.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion terrariumUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
return len(data) > 1

0 comments on commit c63481e

Please sign in to comment.