From fd5c23510ab94f9f643ec32a5f3a6da4d4217c7f Mon Sep 17 00:00:00 2001 From: jeloneal <48490942+jeloneal@users.noreply.github.com> Date: Sun, 23 Jun 2024 10:15:23 +0200 Subject: [PATCH] Update meross_client.py Reformatted to pass test --- src/octoprint_psucontrol_meross/meross_client.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/octoprint_psucontrol_meross/meross_client.py b/src/octoprint_psucontrol_meross/meross_client.py index dcf3330..cb71656 100644 --- a/src/octoprint_psucontrol_meross/meross_client.py +++ b/src/octoprint_psucontrol_meross/meross_client.py @@ -1,4 +1,5 @@ """This module converts async meross-iot library to synchronous bindings flask handle can use.""" + import asyncio import dataclasses @@ -123,12 +124,14 @@ async def login(self, api_base_url: str, user: str, password: str, raise_exc: bo if restore_success: self._logger.debug("Restored saved session.") return True -# if len(api_base_url) > 0 and "https://" not in api_base_url: -# self._logger.info(f"Adding missing \"https://\" prefix to {api_base_url!r}.") -# api_base_url = "https://" + api_base_url.replace("'", "") + # if len(api_base_url) > 0 and "https://" not in api_base_url: + # self._logger.info(f"Adding missing \"https://\" prefix to {api_base_url!r}.") + # api_base_url = "https://" + api_base_url.replace("'", "") else: api_base_url = api_base_url - self._logger.info(f"Performing full auth login for the user {user!r} against {api_base_url!r}.") + self._logger.info( + f"Performing full auth login for the user {user!r} against {api_base_url!r}." + ) try: self.api_client = await MerossHttpClient.async_from_user_password( api_base_url=api_base_url, email=user, password=password