diff --git a/README.md b/README.md index 705b961d8..5de2b8c9c 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ Platypush [![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/BlackLight/platypush.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/BlackLight/platypush/context:python) [![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/BlackLight/platypush.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/BlackLight/platypush/context:javascript) +[[__TOC__]] + - Recommended read: [**Getting started with Platypush**](https://blog.platypush.tech/article/Ultimate-self-hosted-automation-with-Platypush). - The [blog](https://blog.platypush.tech) is in general a good place to get more insights on what you can build with it and inspiration about possible usages. diff --git a/platypush/backend/bluetooth/scanner/__init__.py b/platypush/backend/bluetooth/scanner/__init__.py index da7bf6f10..e144e7f44 100644 --- a/platypush/backend/bluetooth/scanner/__init__.py +++ b/platypush/backend/bluetooth/scanner/__init__.py @@ -84,7 +84,9 @@ class BluetoothScannerBackend(SensorBackend): with self._bt_lock: return super().get_measurement() - def process_data(self, data: Dict[str, dict], new_data: Dict[str, dict]): + def process_data( # lgtm [py/inheritance/signature-mismatch] + self, *, data: Dict[str, dict], new_data: Dict[str, dict] + ): for addr, dev in data.items(): self._add_last_seen_device(dev) diff --git a/platypush/backend/linode/__init__.py b/platypush/backend/linode/__init__.py index ec4ad3558..5b1f673a0 100644 --- a/platypush/backend/linode/__init__.py +++ b/platypush/backend/linode/__init__.py @@ -25,7 +25,7 @@ class LinodeBackend(SensorBackend): super().__init__(plugin='linode', poll_seconds=poll_seconds, **kwargs) self.instances = set(instances or []) - def process_data(self, data: Dict[str, dict], *args, **kwargs): + def process_data(self, *, data: Dict[str, dict], **kwargs): instances = data['instances'] old_instances = (self.data or {}).get('instances', {}) diff --git a/platypush/plugins/camera/__init__.py b/platypush/plugins/camera/__init__.py index ec81f1556..65f667ee0 100644 --- a/platypush/plugins/camera/__init__.py +++ b/platypush/plugins/camera/__init__.py @@ -539,8 +539,8 @@ class CameraPlugin(Plugin, ABC): def _prepare_server_socket(camera: Camera) -> socket.socket: server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) - server_socket.bind(( - camera.info.bind_address or '0.0.0.0', # lgtm [py/bind-socket-all-network-interfaces] + server_socket.bind(( # lgtm [py/bind-socket-all-network-interfaces] + camera.info.bind_address or '0.0.0.0', camera.info.listen_port )) server_socket.listen(1)